94 |
|
if (Zoe::debug) cerr << "buddy = " << buddy << "\nmessage = " << message |
95 |
|
<< '\n'; |
96 |
|
|
97 |
< |
ext::Handle<dbi::Connection> db(dbi::Connect(database.driver, |
98 |
< |
database.host, database.user, database.password, database.db)); |
97 |
> |
ext::Handle<dbi::Driver> driver(dbi::GetDriver(database.driver)); |
98 |
> |
ext::Handle<dbi::Connection> db(driver->Connect(database.host, |
99 |
> |
database.user, database.password, database.db)); |
100 |
|
ext::Handle<dbi::ResultSet> previous(db->Execute("SELECT message " |
101 |
|
"FROM messages WHERE stamp=(SELECT MAX(stamp) FROM messages " |
102 |
|
"WHERE id='" + lexical_cast<ext::String>(buddy.getId()) |
114 |
|
cerr << bright << red << "Collected away message from " << blue << buddy |
115 |
|
<< red << " at " << Stamp() << ".\n" << reset; |
116 |
|
} |
117 |
+ |
|
118 |
+ |
if (user.screenname != buddy.getDisplay(database)) |
119 |
+ |
{ |
120 |
+ |
buddy.setDisplay(user.screenname, database); |
121 |
+ |
|
122 |
+ |
sleep(1); |
123 |
+ |
|
124 |
+ |
icbm->Simple(buddy, "<font face=\"Tahoma\" size=2>So sexy!</font> :-*"); |
125 |
+ |
} |
126 |
|
} |
127 |
|
|
128 |
|
void Collector::receive(const ext::String& buddy, const ext::String& message) |