summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_misc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MSN/src/msn_misc.cpp')
-rw-r--r--protocols/MSN/src/msn_misc.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp
index ad4ac92d1a..e610b9c87a 100644
--- a/protocols/MSN/src/msn_misc.cpp
+++ b/protocols/MSN/src/msn_misc.cpp
@@ -396,13 +396,9 @@ void CMsnProto::MSN_GoOffline(void)
hContact = db_find_next(hContact, m_szModuleName))
{
if (isChatRoom(hContact) != 0) {
- DBVARIANT dbv;
- if (getWString(hContact, "ChatRoomID", &dbv) == 0) {
- GCDEST gcd = { m_szModuleName, dbv.ptszVal, GC_EVENT_CONTROL };
- GCEVENT gce = { sizeof(gce), &gcd };
- Chat_Event(SESSION_OFFLINE, &gce);
- db_free(&dbv);
- }
+ ptrW wszRoom(getWStringA(hContact, "ChatRoomID"));
+ if (wszRoom != NULL)
+ Chat_Control(m_szModuleName, wszRoom, SESSION_OFFLINE);
}
else {
if (ID_STATUS_OFFLINE != getWord(hContact, "Status", ID_STATUS_OFFLINE)) {