summaryrefslogtreecommitdiff
path: root/plugins/NoHistory
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NoHistory')
-rw-r--r--plugins/NoHistory/src/dllmain.cpp6
-rw-r--r--plugins/NoHistory/src/options.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index 2a76dc620a..a1bb09e6ed 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -161,7 +161,7 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) {
HANDLE hContact = (HANDLE)wParam;
bool remove = (DBGetContactSettingByte(hContact, MODULE, DBSETTING_REMOVE, 0) != 0);
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
bool chat_room = (proto && DBGetContactSettingByte(hContact, proto, "ChatRoom", 0) != 0);
CLISTMENUITEM mi = {0};
@@ -227,7 +227,7 @@ int WindowEvent(WPARAM wParam, LPARAM lParam) {
if(!ServiceExists(MS_MSG_MODIFYICON)) return 0;
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
bool chat_room = (proto && DBGetContactSettingByte(hContact, proto, "ChatRoom", 0) != 0);
@@ -263,7 +263,7 @@ int IconPressed(WPARAM wParam, LPARAM lParam) {
if(sicd->flags & MBCF_RIGHTBUTTON) return 0; // ignore right-clicks
if(strcmp(sicd->szModule, MODULE) != 0) return 0; // not our event
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
bool chat_room = (proto && DBGetContactSettingByte(hContact, proto, "ChatRoom", 0) != 0);
if(!chat_room) ServiceToggle((WPARAM)hContact, 0);
diff --git a/plugins/NoHistory/src/options.cpp b/plugins/NoHistory/src/options.cpp
index 45b2c876eb..567e135409 100644
--- a/plugins/NoHistory/src/options.cpp
+++ b/plugins/NoHistory/src/options.cpp
@@ -74,7 +74,7 @@ static void SetAllContactIcons(HWND hwndList)
{
HANDLE hContact = db_find_first();
do {
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
bool chat_room = (proto && DBGetContactSettingByte(hContact, proto, "ChatRoom", 0) != 0);
if(!chat_room) {
@@ -198,7 +198,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
{
HANDLE hContact = db_find_first();
do {
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
bool chat_room = (proto && DBGetContactSettingByte(hContact, proto, "ChatRoom", 0) != 0);
if(!chat_room) {