summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/delphi/m_protocols.inc2
-rw-r--r--include/m_protocols.h2
-rw-r--r--plugins/SimpleStatusMsg/src/main.cpp2
-rwxr-xr-xplugins/StopSpamMod/src/utilities.cpp6
-rw-r--r--plugins/TipperYM/src/popwin.cpp4
-rw-r--r--src/core/stdautoaway/src/autoaway.cpp10
-rw-r--r--src/core/stdaway/src/sendmsg.cpp10
-rw-r--r--src/mir_app/src/miranda.h2
-rw-r--r--src/mir_app/src/protocols.cpp7
9 files changed, 9 insertions, 36 deletions
diff --git a/include/delphi/m_protocols.inc b/include/delphi/m_protocols.inc
index a7d5d545e7..31f9456782 100644
--- a/include/delphi/m_protocols.inc
+++ b/include/delphi/m_protocols.inc
@@ -349,7 +349,7 @@ function Proto_IsAccountEnabled(proto:PPROTOACCOUNT) : byte; stdcall;
Returns 1 if an account is locked and not supposed to change status, 0 otherwise
}
-function Proto_IsAccountLocked(proto:PAnsiChar) : byte; stdcall;
+function Proto_IsAccountLocked(proto:PPROTOACCOUNT) : byte; stdcall;
external AppDLL name 'Proto_IsAccountLocked';
{
diff --git a/include/m_protocols.h b/include/m_protocols.h
index 4003efcb85..b2121b176b 100644
--- a/include/m_protocols.h
+++ b/include/m_protocols.h
@@ -358,7 +358,7 @@ EXTERN_C MIR_APP_DLL(bool) Proto_IsAccountEnabled(const PROTOACCOUNT *pa);
// lParam = (LPARAM)(char*)szAccountName
// Returns 1 if an account is locked and not supposed to change status, 0 otherwise
-EXTERN_C MIR_APP_DLL(bool) Proto_IsAccountLocked(const char *szModuleName);
+EXTERN_C MIR_APP_DLL(bool) Proto_IsAccountLocked(const PROTOACCOUNT *pa);
/////////////////////////////////////////////////////////////////////////////////////////
// gets the account associated with a contact
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp
index 4f100ffca0..1e2fa45748 100644
--- a/plugins/SimpleStatusMsg/src/main.cpp
+++ b/plugins/SimpleStatusMsg/src/main.cpp
@@ -1487,7 +1487,7 @@ static int ChangeStatusMsgPrebuild(WPARAM wParam, LPARAM lParam)
continue;
TCHAR szBuffer[256];
- if (Proto_IsAccountLocked(pa[i]->szModuleName))
+ if (Proto_IsAccountLocked(pa[i]))
{
mir_sntprintf(szBuffer, TranslateT("%s (locked)"), pa[i]->tszAccountName);
mi.ptszPopupName = szBuffer;
diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp
index 8c67f36c0e..c4f350208d 100755
--- a/plugins/StopSpamMod/src/utilities.cpp
+++ b/plugins/StopSpamMod/src/utilities.cpp
@@ -129,8 +129,8 @@ const int Stricmp(const TCHAR *str, const TCHAR *substr)
TCHAR *str_up = NEWTSTR_MALLOC(str);
TCHAR *substr_up = NEWTSTR_MALLOC(substr);
- CharUpperBuff(str_up, mir_tstrlen(str_up));
- CharUpperBuff(substr_up, mir_tstrlen(substr_up));
+ CharUpperBuff(str_up, (int)mir_tstrlen(str_up));
+ CharUpperBuff(substr_up, (int)mir_tstrlen(substr_up));
i = mir_tstrcmp(str_up, substr_up);
@@ -189,7 +189,7 @@ BOOL IsUrlContains(TCHAR * Str)
if(Str && mir_tstrlen(Str)>0) {
TCHAR *StrLower = NEWTSTR_MALLOC(Str);
- CharLowerBuff(StrLower, mir_tstrlen(StrLower));
+ CharLowerBuff(StrLower, (int)mir_tstrlen(StrLower));
for (int i=0; i<CountUrl; i++)
if(_tcsstr (StrLower, URL[i]))
{
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp
index 1423c9b7ba..0423e7e0ee 100644
--- a/plugins/TipperYM/src/popwin.cpp
+++ b/plugins/TipperYM/src/popwin.cpp
@@ -77,7 +77,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
if (mir_tstrlen(pwd->swzTitle) == 0)
a2t(pwd->clcit.szProto, pwd->swzTitle, TITLE_TEXT_LEN);
- if (Proto_IsAccountLocked(pwd->clcit.szProto))
+ if (Proto_IsAccountLocked(pa))
mir_sntprintf(pwd->swzTitle, SIZEOF(pwd->swzTitle), TranslateT("%s (locked)"), pwd->swzTitle);
// protocol status
@@ -1499,7 +1499,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
TCHAR swzProto[256];
mir_tstrcpy(swzProto, pa->tszAccountName);
if (dwItems & TRAYTIP_LOCKSTATUS)
- if (Proto_IsAccountLocked(pa->szModuleName))
+ if (Proto_IsAccountLocked(pa))
mir_sntprintf(swzProto, SIZEOF(swzProto), TranslateT("%s (locked)"), pa->tszAccountName);
AddRow(pwd, swzProto, buff, NULL, false, false, !bFirstItem, true, Skin_LoadProtoIcon(pa->szModuleName, wStatus));
diff --git a/src/core/stdautoaway/src/autoaway.cpp b/src/core/stdautoaway/src/autoaway.cpp
index 9084ab7f61..c8ac72f2ca 100644
--- a/src/core/stdautoaway/src/autoaway.cpp
+++ b/src/core/stdautoaway/src/autoaway.cpp
@@ -35,16 +35,6 @@ static int AutoAwaySound(WPARAM, LPARAM lParam)
///////////////////////////////////////////////////////////////////////////////
-static bool Proto_IsAccountEnabled(PROTOACCOUNT *pa)
-{
- return pa && ((pa->bIsEnabled && !pa->bDynDisabled) || pa->bOldProto);
-}
-
-static bool Proto_IsAccountLocked(PROTOACCOUNT *pa)
-{
- return pa && db_get_b(NULL, pa->szModuleName, "LockMainStatus", 0) != 0;
-}
-
static void Proto_SetStatus(const char *szProto, unsigned status)
{
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) {
diff --git a/src/core/stdaway/src/sendmsg.cpp b/src/core/stdaway/src/sendmsg.cpp
index f40abdec32..68db851844 100644
--- a/src/core/stdaway/src/sendmsg.cpp
+++ b/src/core/stdaway/src/sendmsg.cpp
@@ -27,16 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static DWORD protoModeMsgFlags;
static HWND hwndStatusMsg;
-static bool Proto_IsAccountEnabled(PROTOACCOUNT *pa)
-{
- return pa && ((pa->bIsEnabled && !pa->bDynDisabled) || pa->bOldProto);
-}
-
-static bool Proto_IsAccountLocked(PROTOACCOUNT *pa)
-{
- return pa && db_get_b(NULL, pa->szModuleName, "LockMainStatus", 0) != 0;
-}
-
static const TCHAR *GetDefaultMessage(int status)
{
switch(status) {
diff --git a/src/mir_app/src/miranda.h b/src/mir_app/src/miranda.h
index 3a7f358eac..6b4939f2c1 100644
--- a/src/mir_app/src/miranda.h
+++ b/src/mir_app/src/miranda.h
@@ -150,8 +150,6 @@ PROTOACCOUNT* Proto_CreateAccount(const char *szModuleName, const char *szBasePr
PROTOACCOUNT* __fastcall Proto_GetAccount(MCONTACT hContact);
-bool __fastcall Proto_IsAccountLocked(PROTOACCOUNT *pa);
-
PROTO_INTERFACE* AddDefaultAccount(const char *szProtoName);
int FreeDefaultAccount(PROTO_INTERFACE* ppi);
diff --git a/src/mir_app/src/protocols.cpp b/src/mir_app/src/protocols.cpp
index 1d81c61188..e1fd602abc 100644
--- a/src/mir_app/src/protocols.cpp
+++ b/src/mir_app/src/protocols.cpp
@@ -338,16 +338,11 @@ MIR_APP_DLL(bool) Proto_IsAccountEnabled(const PROTOACCOUNT *pa)
return pa && ((pa->bIsEnabled && !pa->bDynDisabled) || pa->bOldProto);
}
-bool __fastcall Proto_IsAccountLocked(PROTOACCOUNT *pa)
+MIR_APP_DLL(bool) Proto_IsAccountLocked(const PROTOACCOUNT *pa)
{
return pa && db_get_b(NULL, pa->szModuleName, "LockMainStatus", 0) != 0;
}
-MIR_APP_DLL(bool) Proto_IsAccountLocked(const char *pszModuleName)
-{
- return Proto_IsAccountLocked(Proto_GetAccount(pszModuleName));
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
MIR_APP_DLL(int) ProtoServiceExists(const char *szModule, const char *szService)