diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-07 13:15:26 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-04-07 13:15:26 +0000 |
commit | 4e67bd6db63fbd628fb3db7ad73b784b7a2a0036 (patch) | |
tree | 622a8a1435aa15ff1677da9cef0b1779911ec4da /protocols/SkypeWeb | |
parent | 01f445ee06bc3f303d4e7d8fb00938220adbf618 (diff) |
ooops
git-svn-id: http://svn.miranda-ng.org/main/trunk@12650 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r-- | protocols/SkypeWeb/src/skype_chats.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_chats.cpp b/protocols/SkypeWeb/src/skype_chats.cpp new file mode 100644 index 0000000000..ff3cbc607f --- /dev/null +++ b/protocols/SkypeWeb/src/skype_chats.cpp @@ -0,0 +1,27 @@ +#include "common.h"
+
+MCONTACT CSkypeProto::AddChatRoom(const char *chatname)
+{
+ MCONTACT hContact = GetContact(chatname);
+ if (!hContact)
+ {
+ hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)m_szModuleName);
+
+ setString(hContact, "ChatID", chatname);
+
+ TCHAR title[MAX_PATH];
+ mir_sntprintf(title, SIZEOF(title), _T("%s #%d"), TranslateT("Groupchat"), chatname);
+ setTString(hContact, "Nick", title);
+
+ DBVARIANT dbv;
+ if (!db_get_s(NULL, "Chat", "AddToGroup", &dbv, DBVT_TCHAR))
+ {
+ db_set_ts(hContact, "CList", "Group", dbv.ptszVal);
+ db_free(&dbv);
+ }
+
+ setByte(hContact, "ChatRoom", 1);
+ }
+ return hContact;
+}
\ No newline at end of file |