summaryrefslogtreecommitdiff
path: root/plugins/MirOTR
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirOTR')
-rw-r--r--plugins/MirOTR/MirOTR/src/dbfilter.cpp10
-rw-r--r--plugins/MirOTR/MirOTR/src/dllmain.cpp2
-rw-r--r--plugins/MirOTR/MirOTR/src/mirotrmenu.cpp4
-rw-r--r--plugins/MirOTR/MirOTR/src/options.cpp2
-rw-r--r--plugins/MirOTR/MirOTR/src/svcs_menu.cpp14
-rw-r--r--plugins/MirOTR/MirOTR/src/svcs_srmm.cpp4
-rw-r--r--plugins/MirOTR/MirOTR/src/utils.cpp8
7 files changed, 22 insertions, 22 deletions
diff --git a/plugins/MirOTR/MirOTR/src/dbfilter.cpp b/plugins/MirOTR/MirOTR/src/dbfilter.cpp
index 674a4965de..c3ebb7f95a 100644
--- a/plugins/MirOTR/MirOTR/src/dbfilter.cpp
+++ b/plugins/MirOTR/MirOTR/src/dbfilter.cpp
@@ -62,7 +62,7 @@ int OnDatabaseEventPreAdd(WPARAM hContact, LPARAM lParam)
return 0;
if(g_metaproto && strcmp(proto, g_metaproto) == 0) {
- hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
if (!hContact) return 0;
proto = contact_get_proto(hContact);
if (!proto ) return 0;
@@ -196,7 +196,7 @@ int OnDatabaseEventPreAdd(WPARAM hContact, LPARAM lParam)
if (!db_event_get((HANDLE)lParam, &info)) {
if(info.eventType == EVENTTYPE_MESSAGE) {
MCONTACT hSub;
- if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0)) != 0)
hContact = hSub;
ConnContext *context = otrl_context_find_miranda(otr_user_state, hContact);
@@ -252,10 +252,10 @@ int WindowEvent(WPARAM wParam, LPARAM lParam) {
if(mwd->uType != MSG_WINDOW_EVT_OPEN) return 0;
MCONTACT hContact = mwd->hContact, hTemp;
- if(options.bHaveMetaContacts && (hTemp = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ if(options.bHaveMetaContacts && (hTemp = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0)) != 0)
hContact = hTemp;
- if (!CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)MODULENAME))
+ if (!CallService(MS_PROTO_ISPROTOONCONTACT, hContact, (LPARAM)MODULENAME))
return 0;
lib_cs_lock();
@@ -319,7 +319,7 @@ int OnContactSettingChanged(WPARAM hContact, LPARAM lParam)
// Terminate sessions with all contacts of that proto
StatusModeChange((WPARAM) ID_STATUS_OFFLINE, (LPARAM)cws->szModule);
return 0;
- }else if(CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)MODULENAME)) {
+ }else if(CallService(MS_PROTO_ISPROTOONCONTACT, hContact, (LPARAM)MODULENAME)) {
// only care about contacts to which this filter is attached
FinishSession(hContact);
}
diff --git a/plugins/MirOTR/MirOTR/src/dllmain.cpp b/plugins/MirOTR/MirOTR/src/dllmain.cpp
index 22973c7676..232751e146 100644
--- a/plugins/MirOTR/MirOTR/src/dllmain.cpp
+++ b/plugins/MirOTR/MirOTR/src/dllmain.cpp
@@ -89,7 +89,7 @@ extern "C" __declspec(dllexport) int Load(void)
// remove us as a filter to all contacts - fix filter type problem
if(db_get_b(0, MODULENAME, "FilterOrderFix", 0) != 2) {
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
- CallService(MS_PROTO_REMOVEFROMCONTACT, (WPARAM)hContact, (LPARAM)MODULENAME);
+ CallService(MS_PROTO_REMOVEFROMCONTACT, hContact, (LPARAM)MODULENAME);
db_set_b(0, MODULENAME, "FilterOrderFix", 2);
}
diff --git a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp
index 2714a21e4f..513326712f 100644
--- a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp
+++ b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp
@@ -86,7 +86,7 @@ INT_PTR MirOTRMenuCheckService(WPARAM wParam,LPARAM)
return TRUE;
MCONTACT hContact = (MCONTACT)pcpp->wParam, hSub;
- if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0)) != 0)
hContact = hSub;
TrustLevel level = ( TrustLevel )otr_context_get_trust(otrl_context_find_miranda(otr_user_state, hContact));
@@ -177,7 +177,7 @@ LRESULT CALLBACK PopupMenuWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM
}
void ShowOTRMenu(MCONTACT hContact, POINT pt){
- HMENU menu = (HMENU) CallService(MS_MIROTR_MENUBUILDMIROTR, (WPARAM)hContact, 0);
+ HMENU menu = (HMENU) CallService(MS_MIROTR_MENUBUILDMIROTR, hContact, 0);
SetWindowLongPtr(hDummyPaintWin, GWLP_USERDATA, (LONG_PTR)hContact);
TrackPopupMenu(menu, 0, pt.x, pt.y, 0, hDummyPaintWin, 0);
DestroyMenu(menu);
diff --git a/plugins/MirOTR/MirOTR/src/options.cpp b/plugins/MirOTR/MirOTR/src/options.cpp
index f090d9b474..613178905b 100644
--- a/plugins/MirOTR/MirOTR/src/options.cpp
+++ b/plugins/MirOTR/MirOTR/src/options.cpp
@@ -559,7 +559,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsContacts(HWND hwndDlg, UINT msg, WPARAM
TCHAR *proto_t;
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
proto = contact_get_proto(hContact);
- if(proto && db_get_b(hContact, proto, "ChatRoom", 0) == 0 && CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)MODULENAME) // ignore chatrooms
+ if(proto && db_get_b(hContact, proto, "ChatRoom", 0) == 0 && CallService(MS_PROTO_ISPROTOONCONTACT, hContact, (LPARAM)MODULENAME) // ignore chatrooms
&& (g_metaproto == 0 || strcmp(proto, g_metaproto) != 0)) // and MetaContacts
{
lvI.iItem = 0;
diff --git a/plugins/MirOTR/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/MirOTR/src/svcs_menu.cpp
index 5240337872..0db55124ea 100644
--- a/plugins/MirOTR/MirOTR/src/svcs_menu.cpp
+++ b/plugins/MirOTR/MirOTR/src/svcs_menu.cpp
@@ -26,10 +26,10 @@ int StartOTR(MCONTACT hContact) {
INT_PTR SVC_StartOTR(WPARAM hContact, LPARAM lParam)
{
MCONTACT hSub;
- if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0)) != 0)
hContact = hSub;
- if ( options.bHaveSecureIM && CallService("SecureIM/IsContactSecured", (WPARAM)hContact, 0) != 0 ) {
+ if ( options.bHaveSecureIM && CallService("SecureIM/IsContactSecured", hContact, 0) != 0 ) {
TCHAR msg[512];
mir_sntprintf(msg, 512, TranslateT(LANG_OTR_SECUREIM_STARTED), contact_get_nameT(hContact));
ShowError(msg);
@@ -46,10 +46,10 @@ INT_PTR SVC_StartOTR(WPARAM hContact, LPARAM lParam)
INT_PTR SVC_RefreshOTR(WPARAM hContact, LPARAM lParam)
{
MCONTACT hSub;
- if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0)) != 0)
hContact = hSub;
- if ( options.bHaveSecureIM && CallService("SecureIM/IsContactSecured", (WPARAM)hContact, 0) != 0 ) {
+ if ( options.bHaveSecureIM && CallService("SecureIM/IsContactSecured", hContact, 0) != 0 ) {
TCHAR msg[512];
mir_sntprintf(msg, 512, TranslateT(LANG_OTR_SECUREIM_STARTED), contact_get_nameT(hContact));
ShowError(msg);
@@ -69,7 +69,7 @@ INT_PTR SVC_RefreshOTR(WPARAM hContact, LPARAM lParam)
int otr_disconnect_contact(MCONTACT hContact)
{
MCONTACT hSub;
- if(ServiceExists(MS_MC_GETMOSTONLINECONTACT) && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ if(ServiceExists(MS_MC_GETMOSTONLINECONTACT) && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0)) != 0)
hContact = hSub;
const char *proto = contact_get_proto(hContact);
@@ -100,7 +100,7 @@ INT_PTR SVC_StopOTR(WPARAM hContact, LPARAM lParam)
INT_PTR SVC_VerifyOTR(WPARAM hContact, LPARAM lParam)
{
MCONTACT hSub;
- if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0)) != 0)
hContact = hSub;
ConnContext *context = otrl_context_find_miranda(otr_user_state, hContact);
@@ -166,7 +166,7 @@ hide_all:
if(proto && g_metaproto && strcmp(proto, g_metaproto) == 0) {
// make menu act as per most online subcontact
- hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
if (!hContact)
goto hide_all;
proto = contact_get_proto(hContact);
diff --git a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp
index e07473eb15..fcc4b5e85a 100644
--- a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp
+++ b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp
@@ -66,11 +66,11 @@ void SetEncryptionStatus(MCONTACT hContact, TrustLevel level)
Srmm_ModifyIcon(hContact, &sid);
Srmm_ModifyIcon(hContact, &sid2);
- if (options.bHaveButtonsBar) CallService(MS_BB_SETBUTTONSTATE, (WPARAM)hContact, (LPARAM)&button);
+ if (options.bHaveButtonsBar) CallService(MS_BB_SETBUTTONSTATE, hContact, (LPARAM)&button);
db_set_dw(hContact, MODULENAME, "TrustLevel", level);
if (!chat_room && options.bHaveMetaContacts) {
- MCONTACT hMeta = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ MCONTACT hMeta = (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, 0);
MCONTACT hMostOnline = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hMeta, 0);
if(hMeta && hContact == hMostOnline)
SetEncryptionStatus(hMeta, level);
diff --git a/plugins/MirOTR/MirOTR/src/utils.cpp b/plugins/MirOTR/MirOTR/src/utils.cpp
index 6ed4c351f9..03fdbcac7a 100644
--- a/plugins/MirOTR/MirOTR/src/utils.cpp
+++ b/plugins/MirOTR/MirOTR/src/utils.cpp
@@ -136,14 +136,14 @@ char* contact_get_id(MCONTACT hContact, bool bNameOnError) {
}
}
if (!pszUniqueID && bNameOnError) {
- char *name = (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, 0);
+ char *name = (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0);
if (name) pszUniqueID = mir_strdup(name);
}
return pszUniqueID;
}
__inline const TCHAR* contact_get_nameT(MCONTACT hContact) {
- return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR);
}
__inline const char* contact_get_proto(MCONTACT hContact) {
@@ -152,7 +152,7 @@ __inline const char* contact_get_proto(MCONTACT hContact) {
}
__inline const char* contact_get_account(MCONTACT hContact) {
- char *uacc = (char *)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, (WPARAM)hContact, 0);
+ char *uacc = (char *)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, hContact, 0);
return uacc;
}
@@ -364,7 +364,7 @@ bool GetEncryptionStatus(MCONTACT hContact) {
if (!chat_room) {
if (options.bHaveMetaContacts) {
- HANDLE hMeta = (HANDLE)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ HANDLE hMeta = (HANDLE)CallService(MS_MC_GETMETACONTACT, hContact, 0);
if(hMeta && hContact == (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hMeta, 0)) {
//strcat(dbg_msg, "\nrecursing for meta");
return GetEncryptionStatus(hMeta);