diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-19 11:25:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-19 11:25:57 +0000 |
commit | 8fbb710f69be547c9a1fb45346bbd01db9d23bee (patch) | |
tree | b49bf9e58c0aa7fdfd49bce0170062454bee4d9e /protocols/Gadu-Gadu | |
parent | f76565d65450fe2f60913b93938c9a770e8caf4b (diff) |
Chat_AddGroup - even less structures
git-svn-id: http://svn.miranda-ng.org/main/trunk@17316 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu')
-rw-r--r-- | protocols/Gadu-Gadu/src/groupchat.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index b26c271602..8e36822a05 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -209,9 +209,6 @@ wchar_t* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_cou GGGC *chat;
wchar_t id[32];
uin_t uin;
- DBVARIANT dbv;
- GCDEST gcd = { m_szModuleName, 0, GC_EVENT_ADDGROUP };
- GCEVENT gce = { &gcd };
debugLogA("gc_getchat(): Count %d.", recipients_count);
if (!recipients) return NULL;
@@ -333,30 +330,24 @@ wchar_t* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_cou }
free(name);
- gcd.ptszID = chat->id;
+ // Add normal group
+ Chat_AddGroup(m_szModuleName, chat->id, TranslateT("Participants"));
+
+ GCDEST gcd = { m_szModuleName, chat->id, GC_EVENT_JOIN };
+ GCEVENT gce = { &gcd };
gce.ptszUID = id;
gce.dwFlags = GCEF_ADDTOLOG;
- gce.time = 0;
-
- // Add normal group
- gce.ptszStatus = TranslateT("Participants");
- Chat_Event(&gce);
- gcd.iType = GC_EVENT_JOIN;
// Add myself
if (uin = getDword(GG_KEY_UIN, 0))
{
UIN2IDT(uin, id);
- wchar_t* nickT;
- if (!getWString(GG_KEY_NICK, &dbv)) {
- nickT = mir_wstrdup(dbv.ptszVal);
- db_free(&dbv);
- } else {
+ ptrW nickT(getWStringA(GG_KEY_NICK));
+ if (nickT == NULL)
nickT = mir_wstrdup(TranslateT("Me"));
- }
- gce.ptszNick = nickT;
+ gce.ptszNick = nickT;
gce.bIsMe = 1;
Chat_Event(&gce);
mir_free(nickT);
|