diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-23 15:09:06 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-23 15:09:06 +0300 |
commit | 371ac8f6da293e5f4b69d51e3bcb511ba5c1b6e1 (patch) | |
tree | cd07cce643fc91495e6edcfa02412a51f69a7a2f | |
parent | 1d8b7300f544bc7ad3a6b251ddb4bbe8e6120f26 (diff) |
code cleaning
-rw-r--r-- | protocols/ICQ-WIM/src/groupchats.cpp | 14 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/proto.cpp | 4 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/proto.h | 10 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/protocols/ICQ-WIM/src/groupchats.cpp b/protocols/ICQ-WIM/src/groupchats.cpp index 59e9fb68a4..968182e63b 100644 --- a/protocols/ICQ-WIM/src/groupchats.cpp +++ b/protocols/ICQ-WIM/src/groupchats.cpp @@ -20,7 +20,7 @@ #include "stdafx.h"
-SESSION_INFO* CIcqProto::CreateGroupChat(const wchar_t *pwszId, const wchar_t *pwszNick)
+SESSION_INFO* CIcqProto::GcCreate(const wchar_t *pwszId, const wchar_t *pwszNick)
{
auto *si = Chat_NewSession(GCW_CHATROOM, m_szModuleName, pwszId, pwszNick);
if (si == nullptr)
@@ -214,7 +214,7 @@ static gc_item sttLogListItems[] = { LPGENW("&Leave/destroy chat"), IDM_LEAVE, MENU_ITEM }
};
-int CIcqProto::GroupchatMenuHook(WPARAM, LPARAM lParam)
+int CIcqProto::GcMenuHook(WPARAM, LPARAM lParam)
{
GCMENUITEMS *gcmi = (GCMENUITEMS*)lParam;
if (gcmi == nullptr)
@@ -233,7 +233,7 @@ int CIcqProto::GroupchatMenuHook(WPARAM, LPARAM lParam) return 0;
}
-int CIcqProto::GroupchatEventHook(WPARAM, LPARAM lParam)
+int CIcqProto::GcEventHook(WPARAM, LPARAM lParam)
{
GCHOOK *gch = (GCHOOK*)lParam;
if (gch == nullptr)
@@ -258,18 +258,18 @@ int CIcqProto::GroupchatEventHook(WPARAM, LPARAM lParam) break;
case GC_USER_PRIVMESS:
- Chat_SendPrivateMessage(gch);
+ GcSendPrivateMessage(gch);
break;
case GC_USER_LOGMENU:
- Chat_ProcessLogMenu(si, gch->dwData);
+ GcProcessLogMenu(si, gch->dwData);
break;
}
return 1;
}
-void CIcqProto::Chat_ProcessLogMenu(SESSION_INFO *si, int iChoice)
+void CIcqProto::GcProcessLogMenu(SESSION_INFO *si, int iChoice)
{
switch (iChoice) {
case IDM_INVITE:
@@ -282,7 +282,7 @@ void CIcqProto::Chat_ProcessLogMenu(SESSION_INFO *si, int iChoice) }
}
-void CIcqProto::Chat_SendPrivateMessage(GCHOOK *gch)
+void CIcqProto::GcSendPrivateMessage(GCHOOK *gch)
{
MCONTACT hContact;
auto *pUser = FindUser(gch->ptszUID);
diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp index 277ecb6501..9a58298890 100644 --- a/protocols/ICQ-WIM/src/proto.cpp +++ b/protocols/ICQ-WIM/src/proto.cpp @@ -78,8 +78,8 @@ CIcqProto::CIcqProto(const char *aProtoName, const wchar_t *aUserName) : // events
HookProtoEvent(ME_CLIST_GROUPCHANGE, &CIcqProto::OnGroupChange);
- HookProtoEvent(ME_GC_EVENT, &CIcqProto::GroupchatEventHook);
- HookProtoEvent(ME_GC_BUILDMENU, &CIcqProto::GroupchatMenuHook);
+ HookProtoEvent(ME_GC_EVENT, &CIcqProto::GcEventHook);
+ HookProtoEvent(ME_GC_BUILDMENU, &CIcqProto::GcMenuHook);
HookProtoEvent(ME_OPT_INITIALISE, &CIcqProto::OnOptionsInit);
// group chats
diff --git a/protocols/ICQ-WIM/src/proto.h b/protocols/ICQ-WIM/src/proto.h index f665094ad3..1afe659e85 100644 --- a/protocols/ICQ-WIM/src/proto.h +++ b/protocols/ICQ-WIM/src/proto.h @@ -318,13 +318,13 @@ class CIcqProto : public PROTO<CIcqProto> ////////////////////////////////////////////////////////////////////////////////////////
// group chats
- int __cdecl GroupchatEventHook(WPARAM, LPARAM);
- int __cdecl GroupchatMenuHook(WPARAM, LPARAM);
+ int __cdecl GcEventHook(WPARAM, LPARAM);
+ int __cdecl GcMenuHook(WPARAM, LPARAM);
- void Chat_ProcessLogMenu(SESSION_INFO *si, int);
- void Chat_SendPrivateMessage(GCHOOK *gch);
+ void GcProcessLogMenu(SESSION_INFO *si, int);
+ void GcSendPrivateMessage(GCHOOK *gch);
- SESSION_INFO* CreateGroupChat(const wchar_t *pwszId, const wchar_t *pwszNick);
+ SESSION_INFO* GcCreate(const wchar_t *pwszId, const wchar_t *pwszNick);
void RetrieveChatInfo(MCONTACT hContact);
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index 16472244f3..6d017376a2 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -357,7 +357,7 @@ MCONTACT CIcqProto::ParseBuddyInfo(const JSONNode &buddy, MCONTACT hContact, boo return INVALID_CONTACT_ID;
CMStringW wszChatName(buddy["friendly"].as_mstring());
- auto *si = CreateGroupChat(wszId, wszChatName);
+ auto *si = GcCreate(wszId, wszChatName);
return (si) ? si->hContact : INVALID_CONTACT_ID;
}
|