diff options
Diffstat (limited to 'plugins/TipperYM/src')
-rw-r--r-- | plugins/TipperYM/src/message_pump.cpp | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/popwin.cpp | 8 | ||||
-rw-r--r-- | plugins/TipperYM/src/subst.cpp | 20 |
3 files changed, 15 insertions, 15 deletions
diff --git a/plugins/TipperYM/src/message_pump.cpp b/plugins/TipperYM/src/message_pump.cpp index 7032ad84b2..db57fadf07 100644 --- a/plugins/TipperYM/src/message_pump.cpp +++ b/plugins/TipperYM/src/message_pump.cpp @@ -58,7 +58,7 @@ bool NeedWaitForContent(CLCINFOTIPEX *clcitex) if (opt.bWaitForContent && IsContactTooltip(clcitex))
{
- char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)clcitex->hItem, 0);
+ char *szProto = GetContactProto(clcitex->hItem);
if (!szProto) return false;
if (opt.bWaitForStatusMsg && !bStatusMsgReady)
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 34cf0f596a..d7a3ae6c80 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -378,7 +378,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa TCHAR *swzNick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)pwd->hContact, GCDNF_TCHAR);
_tcsncpy(pwd->swzTitle, swzNick, TITLE_TEXT_LEN);
- char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)pwd->hContact, 0);
+ char *szProto = GetContactProto(pwd->hContact);
pwd->spiTitle = Smileys_PreParse(pwd->swzTitle, -1, szProto);
// get extra icons
@@ -1266,7 +1266,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa pwd->rows = (RowData *)mir_realloc(pwd->rows, sizeof(RowData) * (pwd->iRowCount + 1));
}
- char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)pwd->hContact, 0);
+ char *szProto = GetContactProto(pwd->hContact);
pwd->rows[pwd->iRowCount].swzLabel = mir_tstrdup(buff_label);
pwd->rows[pwd->iRowCount].swzValue = mir_tstrdup(buff);
@@ -1772,7 +1772,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa HANDLE hContact = db_find_first();
while (hContact)
{
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
if (proto && !strcmp(proto, pa->szModuleName))
{
if (DBGetContactSettingWord(hContact, proto, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
@@ -1932,7 +1932,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa {
if (DBGetContactSettingByte(hContact, MODULE, "FavouriteContact", 0))
{
- char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
if (proto)
{
WORD wStatus = DBGetContactSettingWord(hContact, proto, "Status", ID_STATUS_OFFLINE);
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index 4ba14de1e3..9320430577 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -159,7 +159,7 @@ bool Uid(HANDLE hContact, char *szProto, TCHAR *buff, int bufflen) {
char *tmpProto = NULL;
- if (hContact) tmpProto = ( char* )CallService(MS_PROTO_GETCONTACTBASEPROTO,(WPARAM)hContact, 0);
+ if (hContact) tmpProto = GetContactProto(hContact);
else tmpProto = szProto;
if (tmpProto)
@@ -258,7 +258,7 @@ TCHAR *GetStatusMessageText(HANDLE hContact) TCHAR *swzMsg = 0;
DBVARIANT dbv;
- char *szProto = ( char* )CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto)
{
if (!strcmp(szProto, szMetaModuleName))
@@ -310,7 +310,7 @@ bool GetSysSubstText(HANDLE hContact, TCHAR *swzRawSpec, TCHAR *buff, int buffle }
else if (!_tcscmp(swzRawSpec, _T("proto")))
{
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto)
{
a2t(szProto, buff, bufflen);
@@ -343,7 +343,7 @@ bool GetSysSubstText(HANDLE hContact, TCHAR *swzRawSpec, TCHAR *buff, int buffle }
else if (!_tcscmp(swzRawSpec, _T("uidname")))
{
- char *szProto = ( char* )CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
return UidName(szProto, buff, bufflen);
}
else if (!_tcscmp(swzRawSpec, _T("status_msg")))
@@ -426,7 +426,7 @@ bool GetSysSubstText(HANDLE hContact, TCHAR *swzRawSpec, TCHAR *buff, int buffle int iNumber = 1;
HANDLE hTmpContact = hContact;
- char *szProto = ( char* )CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto && !strcmp(szProto, szMetaModuleName))
{
iNumber = CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, 0);
@@ -519,7 +519,7 @@ bool GetSubstText(HANDLE hContact, const DISPLAYSUBST &ds, TCHAR *buff, int buff return transFunc(hContact, ds.szModuleName, ds.szSettingName, buff, bufflen) != 0;
case DVT_PROTODB:
{
- char *szProto = ( char* )CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto)
{
if (transFunc(hContact, szProto, ds.szSettingName, buff, bufflen) != 0)
@@ -543,7 +543,7 @@ bool GetRawSubstText(HANDLE hContact, char *szRawSpec, TCHAR *buff, int bufflen) szRawSpec[i] = 0;
if (strlen(szRawSpec) == 0)
{
- char *szProto = ( char* )CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto)
{
if (translations[0].transFunc(hContact, szProto, &szRawSpec[i + 1], buff, bufflen) != 0)
@@ -624,7 +624,7 @@ bool ApplySubst(HANDLE hContact, const TCHAR *swzSource, bool parseTipperVarsFir p++;
if (*p)
{
- char *cp = ( char* )CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *cp = GetContactProto(hContact);
if (cp != NULL)
{
PROTOACCOUNT *acc = ProtoGetAccount(cp);
@@ -916,13 +916,13 @@ TCHAR *GetProtoExtraStatusMessage(char *szProto) if (ServiceExists(MS_VARS_FORMATSTRING))
{
HANDLE hContact = db_find_first();
- char *proto = ( char* )CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *proto = GetContactProto(hContact);
while(!proto)
{
hContact = db_find_next(hContact);
if (hContact)
{
- proto = ( char* )CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ proto = GetContactProto(hContact);
}
else
{
|