summaryrefslogtreecommitdiff
path: root/protocols/IRCG/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-28 11:05:10 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-28 11:05:10 +0000
commit90c2f2a24e911c832e11fcc6443afd24efdd4cc9 (patch)
tree719972a0755925073ab6aeb7aa24e92eed5b1427 /protocols/IRCG/src
parentf302909f341c5bf61bcb432d73443df6c3ba44c9 (diff)
- fix for name conflict in proto helpers;
- switch to constants defined in m_nudge.h git-svn-id: http://svn.miranda-ng.org/main/trunk@5504 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IRCG/src')
-rw-r--r--protocols/IRCG/src/ircproto.cpp57
1 files changed, 29 insertions, 28 deletions
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp
index c45baa3d88..9a5cfe818d 100644
--- a/protocols/IRCG/src/ircproto.cpp
+++ b/protocols/IRCG/src/ircproto.cpp
@@ -43,28 +43,28 @@ CIrcProto::CIrcProto(const char* szModuleName, const TCHAR* tszUserName) :
InitializeCriticalSection(&m_gchook);
m_evWndCreate = ::CreateEvent( NULL, FALSE, FALSE, NULL );
- CreateService( PS_GETMYAWAYMSG, &CIrcProto::GetMyAwayMsg );
-
- CreateService( PS_CREATEACCMGRUI, &CIrcProto::SvcCreateAccMgrUI );
- CreateService( PS_JOINCHAT, &CIrcProto::OnJoinChat );
- CreateService( PS_LEAVECHAT, &CIrcProto::OnLeaveChat );
-
- CreateService( IRC_JOINCHANNEL, &CIrcProto::OnJoinMenuCommand );
- CreateService( IRC_QUICKCONNECT, &CIrcProto::OnQuickConnectMenuCommand);
- CreateService( IRC_CHANGENICK, &CIrcProto::OnChangeNickMenuCommand );
- CreateService( IRC_SHOWLIST, &CIrcProto::OnShowListMenuCommand );
- CreateService( IRC_SHOWSERVER, &CIrcProto::OnShowServerMenuCommand );
- CreateService( IRC_UM_CHANSETTINGS, &CIrcProto::OnMenuChanSettings );
- CreateService( IRC_UM_WHOIS, &CIrcProto::OnMenuWhois );
- CreateService( IRC_UM_DISCONNECT, &CIrcProto::OnMenuDisconnect );
- CreateService( IRC_UM_IGNORE, &CIrcProto::OnMenuIgnore );
-
- CreateService( "/DblClickEvent", &CIrcProto::OnDoubleclicked );
- CreateService( "/InsertRawIn", &CIrcProto::Scripting_InsertRawIn );
- CreateService( "/InsertRawOut", &CIrcProto::Scripting_InsertRawOut );
- CreateService( "/InsertGuiIn", &CIrcProto::Scripting_InsertGuiIn );
- CreateService( "/InsertGuiOut", &CIrcProto::Scripting_InsertGuiOut);
- CreateService( "/GetIrcData", &CIrcProto::Scripting_GetIrcData);
+ CreateProtoService( PS_GETMYAWAYMSG, &CIrcProto::GetMyAwayMsg );
+
+ CreateProtoService( PS_CREATEACCMGRUI, &CIrcProto::SvcCreateAccMgrUI );
+ CreateProtoService( PS_JOINCHAT, &CIrcProto::OnJoinChat );
+ CreateProtoService( PS_LEAVECHAT, &CIrcProto::OnLeaveChat );
+
+ CreateProtoService( IRC_JOINCHANNEL, &CIrcProto::OnJoinMenuCommand );
+ CreateProtoService( IRC_QUICKCONNECT, &CIrcProto::OnQuickConnectMenuCommand);
+ CreateProtoService( IRC_CHANGENICK, &CIrcProto::OnChangeNickMenuCommand );
+ CreateProtoService( IRC_SHOWLIST, &CIrcProto::OnShowListMenuCommand );
+ CreateProtoService( IRC_SHOWSERVER, &CIrcProto::OnShowServerMenuCommand );
+ CreateProtoService( IRC_UM_CHANSETTINGS, &CIrcProto::OnMenuChanSettings );
+ CreateProtoService( IRC_UM_WHOIS, &CIrcProto::OnMenuWhois );
+ CreateProtoService( IRC_UM_DISCONNECT, &CIrcProto::OnMenuDisconnect );
+ CreateProtoService( IRC_UM_IGNORE, &CIrcProto::OnMenuIgnore );
+
+ CreateProtoService( "/DblClickEvent", &CIrcProto::OnDoubleclicked );
+ CreateProtoService( "/InsertRawIn", &CIrcProto::Scripting_InsertRawIn );
+ CreateProtoService( "/InsertRawOut", &CIrcProto::Scripting_InsertRawOut );
+ CreateProtoService( "/InsertGuiIn", &CIrcProto::Scripting_InsertGuiIn );
+ CreateProtoService( "/InsertGuiOut", &CIrcProto::Scripting_InsertGuiOut);
+ CreateProtoService( "/GetIrcData", &CIrcProto::Scripting_GetIrcData);
codepage = CP_ACP;
InitializeCriticalSection(&m_resolve);
@@ -228,9 +228,10 @@ int CIrcProto::OnModulesLoaded( WPARAM, LPARAM )
gcr.pColors = colors;
gcr.ptszModuleDispName = m_tszUserName;
gcr.pszModule = m_szModuleName;
- CallServiceSync( MS_GC_REGISTER, NULL, (LPARAM)&gcr );
- HookEvent( ME_GC_EVENT, &CIrcProto::GCEventHook );
- HookEvent( ME_GC_BUILDMENU, &CIrcProto::GCMenuHook );
+ CallServiceSync(MS_GC_REGISTER, NULL, (LPARAM)&gcr);
+
+ HookProtoEvent(ME_GC_EVENT, &CIrcProto::GCEventHook);
+ HookProtoEvent(ME_GC_BUILDMENU, &CIrcProto::GCMenuHook);
GCSESSION gcw = { sizeof(GCSESSION) };
gcw.dwFlags = GC_TCHAR;
@@ -238,7 +239,7 @@ int CIrcProto::OnModulesLoaded( WPARAM, LPARAM )
gcw.ptszID = SERVERWINDOW;
gcw.pszModule = m_szModuleName;
gcw.ptszName = NEWTSTR_ALLOCA(( TCHAR* )_A2T( m_network ));
- CallServiceSync( MS_GC_NEWSESSION, 0, (LPARAM)&gcw );
+ CallServiceSync(MS_GC_NEWSESSION, 0, (LPARAM)&gcw);
GCDEST gcd = { 0 };
gcd.ptszID = SERVERWINDOW;
@@ -309,8 +310,8 @@ int CIrcProto::OnModulesLoaded( WPARAM, LPARAM )
InitIgnore();
- HookEvent( ME_USERINFO_INITIALISE, &CIrcProto::OnInitUserInfo );
- HookEvent( ME_OPT_INITIALISE, &CIrcProto::OnInitOptionsPages );
+ HookProtoEvent( ME_USERINFO_INITIALISE, &CIrcProto::OnInitUserInfo );
+ HookProtoEvent( ME_OPT_INITIALISE, &CIrcProto::OnInitOptionsPages );
if (m_nick[0]) {
TCHAR szBuf[ 40 ];