summaryrefslogtreecommitdiff
path: root/protocols/Icq10/src/proto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Icq10/src/proto.cpp')
-rw-r--r--protocols/Icq10/src/proto.cpp84
1 files changed, 0 insertions, 84 deletions
diff --git a/protocols/Icq10/src/proto.cpp b/protocols/Icq10/src/proto.cpp
index 978bf847dc..1d849d68c9 100644
--- a/protocols/Icq10/src/proto.cpp
+++ b/protocols/Icq10/src/proto.cpp
@@ -107,90 +107,6 @@ void CIcqProto::OnContactDeleted(MCONTACT hContact)
}
/////////////////////////////////////////////////////////////////////////////////////////
-// Group chats
-
-static gc_item sttLogListItems[] =
-{
- { LPGENW("&Invite a user"), IDM_INVITE, MENU_ITEM },
-};
-
-int CIcqProto::GroupchatMenuHook(WPARAM, LPARAM lParam)
-{
- GCMENUITEMS* gcmi = (GCMENUITEMS*)lParam;
- if (gcmi == nullptr)
- return 0;
-
- if (mir_strcmpi(gcmi->pszModule, m_szModuleName))
- return 0;
-
- SESSION_INFO *si = g_chatApi.SM_FindSession(gcmi->pszID, gcmi->pszModule);
- if (si == nullptr)
- return 0;
-
- if (gcmi->Type == MENU_ON_LOG)
- Chat_AddMenuItems(gcmi->hMenu, _countof(sttLogListItems), sttLogListItems, &g_plugin);
-
- return 0;
-}
-
-int CIcqProto::GroupchatEventHook(WPARAM, LPARAM lParam)
-{
- GCHOOK *gch = (GCHOOK*)lParam;
- if (gch == nullptr)
- return 0;
-
- if (mir_strcmpi(gch->pszModule, m_szModuleName))
- return 0;
-
- SESSION_INFO *si = g_chatApi.SM_FindSession(gch->ptszID, gch->pszModule);
- if (si == nullptr)
- return 0;
-
- switch (gch->iType) {
- case GC_USER_MESSAGE:
- rtrimw(gch->ptszText);
- if (!mir_wstrlen(gch->ptszText))
- break;
-
- if (m_bOnline) {
- wchar_t *wszText = NEWWSTR_ALLOCA(gch->ptszText);
- Chat_UnescapeTags(wszText);
- SendMsg(si->hContact, 0, T2Utf(wszText));
- }
- break;
-
- case GC_USER_PRIVMESS:
- SendPrivateMessage(gch);
- break;
-
- case GC_USER_LOGMENU:
- // Chat_ProcessLogMenu(gch);
- break;
-
- case GC_USER_NICKLISTMENU:
- break;
- }
-
- return 0;
-}
-
-void CIcqProto::SendPrivateMessage(GCHOOK *gch)
-{
- MCONTACT hContact;
- DWORD dwUin = _wtoi(gch->ptszUID);
- auto *pCache = FindContactByUIN(dwUin);
- if (pCache == nullptr) {
- hContact = CreateContact(dwUin, true);
- setWString(hContact, "Nick", gch->ptszNick);
- db_set_b(hContact, "CList", "Hidden", 1);
- db_set_dw(hContact, "Ignore", "Mask1", 0);
- }
- else hContact = pCache->m_hContact;
-
- CallService(MS_MSG_SENDMESSAGE, hContact, 0);
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
void CIcqProto::MarkReadTimerProc(HWND hwnd, UINT, UINT_PTR id, DWORD)
{