From 8fbb710f69be547c9a1fb45346bbd01db9d23bee Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 19 Sep 2016 11:25:57 +0000 Subject: Chat_AddGroup - even less structures git-svn-id: http://svn.miranda-ng.org/main/trunk@17316 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IRCG/src/commandmonitor.cpp | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'protocols/IRCG/src') diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 9adb247adb..72788f322b 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -1277,20 +1277,12 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) PostIrcMessage(L"/MODE %s", sChanName); // register the statuses - GCDEST gcd = { m_szModuleName, sID, GC_EVENT_ADDGROUP }; - GCEVENT gce = { &gcd }; - gce.ptszStatus = L"Owner"; - Chat_Event(&gce); - gce.ptszStatus = L"Admin"; - Chat_Event(&gce); - gce.ptszStatus = L"Op"; - Chat_Event(&gce); - gce.ptszStatus = L"Halfop"; - Chat_Event(&gce); - gce.ptszStatus = L"Voice"; - Chat_Event(&gce); - gce.ptszStatus = L"Normal"; - Chat_Event(&gce); + Chat_AddGroup(m_szModuleName, sID, L"Owner"); + Chat_AddGroup(m_szModuleName, sID, L"Admin"); + Chat_AddGroup(m_szModuleName, sID, L"Op"); + Chat_AddGroup(m_szModuleName, sID, L"Halfop"); + Chat_AddGroup(m_szModuleName, sID, L"Voice"); + Chat_AddGroup(m_szModuleName, sID, L"Normal"); { int k = 0; CMStringW sTemp = GetWord(sNamesList, k); @@ -1305,7 +1297,8 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) while (PrefixToStatus(sTemp[0]) != L"Normal") sTemp.Delete(0, 1); - gcd.iType = GC_EVENT_JOIN; + GCDEST gcd = { m_szModuleName, sID, GC_EVENT_JOIN }; + GCEVENT gce = { &gcd }; gce.ptszUID = sTemp; gce.ptszNick = sTemp; gce.ptszStatus = sStat; @@ -2336,8 +2329,7 @@ bool CIrcProto::DoOnConnect(const CIrcMessage*) } } - DoEvent(GC_EVENT_ADDGROUP, SERVERWINDOW, NULL, NULL, L"Normal", NULL, NULL, FALSE, TRUE); - + Chat_AddGroup(m_szModuleName, SERVERWINDOW, L"Normal"); Chat_Control(m_szModuleName, SERVERWINDOW, SESSION_ONLINE); CallFunctionAsync(sttMainThrdOnConnect, this); -- cgit v1.2.3