diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Twitter/src/chat.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/protocols/Twitter/src/chat.cpp b/protocols/Twitter/src/chat.cpp index 6c268dbfa6..7fe8b4f667 100644 --- a/protocols/Twitter/src/chat.cpp +++ b/protocols/Twitter/src/chat.cpp @@ -131,18 +131,9 @@ void CTwitterProto::SetChatStatus(int status) if (isChatRoom(hContact))
continue;
- DBVARIANT uid, nick;
- if (getString(hContact, TWITTER_KEY_UN, &uid))
- continue;
-
- if (!db_get_s(hContact, "CList", "MyHandle", &nick)) {
- AddChatContact(uid.pszVal, nick.pszVal);
- db_free(&nick);
- }
- else
- AddChatContact(uid.pszVal);
-
- db_free(&uid);
+ ptrA uid(getUStringA(hContact, TWITTER_KEY_UN)), nick(db_get_utfa(hContact, "CList", "MyHandle"));
+ if (uid)
+ AddChatContact(uid, nick);
}
// For some reason, I have to send an INITDONE message, even if I'm not actually
|