diff options
Diffstat (limited to 'protocols/SkypeWeb/src/skype_chats.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_chats.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/protocols/SkypeWeb/src/skype_chats.cpp b/protocols/SkypeWeb/src/skype_chats.cpp index db3f37e8f2..c69221da0d 100644 --- a/protocols/SkypeWeb/src/skype_chats.cpp +++ b/protocols/SkypeWeb/src/skype_chats.cpp @@ -1,8 +1,20 @@ #include "common.h"
+MCONTACT CSkypeProto::GetChat(const char *skypename)
+{
+ MCONTACT hContact = NULL;
+ for (hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
+ {
+ ptrA cSkypename(getStringA(hContact, "ChatID"));
+ if (mir_strcmpi(skypename, cSkypename) == 0)
+ break;
+ }
+ return hContact;
+}
+
MCONTACT CSkypeProto::AddChatRoom(const char *chatname)
{
- MCONTACT hContact = GetContact(chatname);
+ MCONTACT hContact = GetChat(chatname);
if (!hContact)
{
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
|