From 05cd7934d4bdb097e112efdda356946868f3f5d6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 8 Jan 2014 19:39:48 +0000 Subject: - end of ANSI support in chats; - manual crit section control removed from chat engine; - bunch of memory-related clutches either removed or replaced with smart pointers git-svn-id: http://svn.miranda-ng.org/main/trunk@7549 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IRCG/src/input.cpp | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) (limited to 'protocols/IRCG/src/input.cpp') diff --git a/protocols/IRCG/src/input.cpp b/protocols/IRCG/src/input.cpp index eb8125a351..674f8e857c 100644 --- a/protocols/IRCG/src/input.cpp +++ b/protocols/IRCG/src/input.cpp @@ -224,14 +224,8 @@ BOOL CIrcProto::DoHardcodedCommand( CMString text, TCHAR* window, HANDLE hContac if ( command == _T("/servershow") || command == _T("/serverhide")) { if ( m_useServer ) { - GCEVENT gce = {0}; - GCDEST gcd = {0}; - gce.dwFlags = GC_TCHAR; - gcd.iType = GC_EVENT_CONTROL; - gcd.ptszID = SERVERWINDOW; - gcd.pszModule = m_szModuleName; - gce.cbSize = sizeof(GCEVENT); - gce.pDest = &gcd; + GCDEST gcd = { m_szModuleName, SERVERWINDOW, GC_EVENT_CONTROL }; + GCEVENT gce = { sizeof(gce), &gcd }; CallChatEvent( command == _T("/servershow") ? WINDOW_VISIBLE : WINDOW_HIDDEN, (LPARAM)&gce); } return true; @@ -261,15 +255,9 @@ BOOL CIrcProto::DoHardcodedCommand( CMString text, TCHAR* window, HANDLE hContac else S = MakeWndID( window ); - GCEVENT gce = {0}; - GCDEST gcd = {0}; - gce.cbSize = sizeof(GCEVENT); - gcd.iType = GC_EVENT_CONTROL; - gcd.pszModule = m_szModuleName; - gce.pDest = &gcd; - gce.dwFlags = GC_TCHAR; - gcd.ptszID = (TCHAR*)S.c_str(); - CallChatEvent( WINDOW_CLEARLOG, (LPARAM)&gce); + GCDEST gcd = { m_szModuleName, (TCHAR*)S.c_str(), GC_EVENT_CONTROL }; + GCEVENT gce = { sizeof(gce), &gcd }; + CallChatEvent(WINDOW_CLEARLOG, (LPARAM)&gce); return true; } @@ -488,15 +476,9 @@ BOOL CIrcProto::DoHardcodedCommand( CMString text, TCHAR* window, HANDLE hContac return true; } - GCEVENT gce = {0}; - GCDEST gcd = {0}; - gcd.iType = GC_EVENT_CONTROL; CMString S = MakeWndID(window); - gcd.ptszID = (TCHAR*)S.c_str(); - gcd.pszModule = m_szModuleName; - gce.cbSize = sizeof(GCEVENT); - gce.dwFlags = GC_TCHAR; - gce.pDest = &gcd; + GCDEST gcd = { m_szModuleName, (TCHAR*)S.c_str(), GC_EVENT_CONTROL }; + GCEVENT gce = { sizeof(gce), &gcd }; CallChatEvent( SESSION_TERMINATE, (LPARAM)&gce); PostIrcMessage( _T("/JOIN %s"), GetWordAddress(text.c_str(), 1)); -- cgit v1.2.3