summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/chat
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-25 12:54:45 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-25 12:54:45 +0000
commitbd8a04455d9c991c15df2287e091abe4ba054efb (patch)
tree6af5485d60feef741669eb545a6378e7c209ab59 /plugins/TabSRMM/src/chat
parent7fdce14cd488e25e8e32e34098fbe9f5cb3021b7 (diff)
typed stub for MS_PROTO_GETCONTACTBASEPROTO
git-svn-id: http://svn.miranda-ng.org/main/trunk@2480 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/chat')
-rw-r--r--plugins/TabSRMM/src/chat/clist.cpp14
-rw-r--r--plugins/TabSRMM/src/chat/services.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp2
3 files changed, 9 insertions, 9 deletions
diff --git a/plugins/TabSRMM/src/chat/clist.cpp b/plugins/TabSRMM/src/chat/clist.cpp
index dbcbb27ee8..628a7372ab 100644
--- a/plugins/TabSRMM/src/chat/clist.cpp
+++ b/plugins/TabSRMM/src/chat/clist.cpp
@@ -105,7 +105,7 @@ HANDLE CList_AddRoom(const char* pszModule, const TCHAR* pszRoom, const TCHAR* p
BOOL CList_SetOffline(HANDLE hContact, BOOL bHide)
{
if (hContact) {
- char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char* szProto = GetContactProto(hContact);
if (szProto == NULL)
return FALSE;
@@ -124,7 +124,7 @@ BOOL CList_SetAllOffline(BOOL bHide, const char *pszModule)
hContact = db_find_first();
while (hContact) {
- szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ szProto = GetContactProto(hContact);
if (MM_FindModule(szProto)) {
if (!pszModule || (pszModule && !strcmp(pszModule, szProto))) {
int i = M->GetByte(hContact, szProto, "ChatRoom", 0);
@@ -151,7 +151,7 @@ int CList_RoomDoubleclicked(WPARAM wParam, LPARAM lParam)
if (!hContact)
return 0;
- szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ szProto = GetContactProto(hContact);
if (MM_FindModule(szProto)) {
if (M->GetByte(hContact, szProto, "ChatRoom", 0) == 0)
return 0;
@@ -196,7 +196,7 @@ INT_PTR CList_JoinChat(WPARAM wParam, LPARAM lParam)
{
HANDLE hContact = (HANDLE)wParam;
if ( hContact ) {
- char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char* szProto = GetContactProto(hContact);
if ( szProto ) {
if ( DBGetContactSettingWord( hContact, szProto, "Status", 0 ) == ID_STATUS_OFFLINE )
CallProtoService( szProto, PS_JOINCHAT, wParam, lParam );
@@ -211,7 +211,7 @@ INT_PTR CList_LeaveChat(WPARAM wParam, LPARAM lParam)
{
HANDLE hContact = (HANDLE)wParam;
if ( hContact ) {
- char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char* szProto = GetContactProto(hContact);
if ( szProto )
CallProtoService( szProto, PS_LEAVECHAT, wParam, lParam );
}
@@ -222,7 +222,7 @@ int CList_PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
HANDLE hContact = (HANDLE)wParam;
if ( hContact ) {
- char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char* szProto = GetContactProto(hContact);
CLISTMENUITEM clmi = {0};
clmi.cbSize = sizeof(CLISTMENUITEM);
@@ -308,7 +308,7 @@ HANDLE CList_FindRoom(const char* pszModule, const TCHAR* pszRoom)
{
HANDLE hContact = db_find_first();
while (hContact) {
- char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char* szProto = GetContactProto(hContact);
if (szProto && !lstrcmpiA(szProto, pszModule)) {
if (M->GetByte(hContact, szProto, "ChatRoom", 0) != 0) {
DBVARIANT dbv;
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp
index 52664447a3..5690e08154 100644
--- a/plugins/TabSRMM/src/chat/services.cpp
+++ b/plugins/TabSRMM/src/chat/services.cpp
@@ -464,7 +464,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT
}
else lstrcpyn(newcontactname, _T("_U_"), SIZEOF(newcontactname));
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) newData.hContact, 0);
+ char *szProto = GetContactProto(newData.hContact);
WORD wStatus = szProto == NULL ? ID_STATUS_OFFLINE : DBGetContactSettingWord((HANDLE) newData.hContact, szProto, "Status", ID_STATUS_OFFLINE);
char *szStatus = (char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, szProto == NULL ? ID_STATUS_OFFLINE : DBGetContactSettingWord((HANDLE)newData.hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index bcf331f15c..6d85d6244a 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -1962,7 +1962,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
si = psi;
dat->si = psi;
dat->hContact = psi->hContact;
- dat->szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)psi->hContact, 0);
+ dat->szProto = GetContactProto(psi->hContact);
dat->bType = SESSIONTYPE_CHAT;
dat->Panel = new CInfoPanel(dat);