diff options
Diffstat (limited to 'protocols/Tlen/src')
-rw-r--r-- | protocols/Tlen/src/jabber_iqid.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_misc.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_svc.cpp | 6 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_thread.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_muc.cpp | 4 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_userinfo.cpp | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/protocols/Tlen/src/jabber_iqid.cpp b/protocols/Tlen/src/jabber_iqid.cpp index 2fde1bb6df..49df5a88be 100644 --- a/protocols/Tlen/src/jabber_iqid.cpp +++ b/protocols/Tlen/src/jabber_iqid.cpp @@ -213,7 +213,7 @@ void JabberIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) list = NULL;
hContact = db_find_first();
while (hContact != NULL) {
- str = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ str = GetContactProto(hContact);
if (str != NULL && !strcmp(str, proto->m_szModuleName)) {
if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
if (!JabberListExist(proto, LIST_ROSTER, dbv.pszVal)) {
diff --git a/protocols/Tlen/src/jabber_misc.cpp b/protocols/Tlen/src/jabber_misc.cpp index c9db7eed21..b31dcd7815 100644 --- a/protocols/Tlen/src/jabber_misc.cpp +++ b/protocols/Tlen/src/jabber_misc.cpp @@ -93,7 +93,7 @@ HANDLE JabberHContactFromJID(TlenProtocol *proto, const char *jid) hContactMatched = NULL;
hContact = db_find_first();
while (hContact != NULL) {
- szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ szProto = GetContactProto(hContact);
if (szProto != NULL && !strcmp(proto->m_szModuleName, szProto)) {
if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
if ((p=dbv.pszVal) != NULL) {
diff --git a/protocols/Tlen/src/jabber_svc.cpp b/protocols/Tlen/src/jabber_svc.cpp index 345490df30..0c4ba468e5 100644 --- a/protocols/Tlen/src/jabber_svc.cpp +++ b/protocols/Tlen/src/jabber_svc.cpp @@ -931,7 +931,7 @@ int JabberDbSettingChanged(void *ptr, WPARAM wParam, LPARAM lParam) char *szProto, *nick, *jid, *group;
hContact = (HANDLE) wParam;
- szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ szProto = GetContactProto(hContact);
if (szProto == NULL || strcmp(szProto, proto->m_szModuleName)) return 0;
// if (DBGetContactSettingByte(hContact, proto->m_szModuleName, "ChatRoom", 0) != 0) return 0;
// A contact's group is changed
@@ -977,7 +977,7 @@ int JabberDbSettingChanged(void *ptr, WPARAM wParam, LPARAM lParam) char *newNick;
// hContact = (HANDLE) wParam;
-// szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+// szProto = GetContactProto(hContact);
// if (szProto == NULL || strcmp(szProto, proto->m_szModuleName)) return 0;
if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
@@ -1058,7 +1058,7 @@ int JabberContactDeleted(void *ptr, WPARAM wParam, LPARAM lParam) if (!proto->isOnline) // should never happen
return 0;
- szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
+ szProto = GetContactProto((HANDLE)wParam);
if (szProto == NULL || strcmp(szProto, proto->m_szModuleName))
return 0;
if (!DBGetContactSetting((HANDLE) wParam, proto->m_szModuleName, "jid", &dbv)) {
diff --git a/protocols/Tlen/src/jabber_thread.cpp b/protocols/Tlen/src/jabber_thread.cpp index b9fe951ee1..1250c2aa13 100644 --- a/protocols/Tlen/src/jabber_thread.cpp +++ b/protocols/Tlen/src/jabber_thread.cpp @@ -369,7 +369,7 @@ void __cdecl JabberServerThread(ThreadData *info) // Set all contacts to offline
hContact = db_find_first();
while (hContact != NULL) {
- str = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ str = GetContactProto(hContact);
if (str != NULL && !strcmp(str, info->proto->m_szModuleName)) {
if (DBGetContactSettingWord(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
DBWriteContactSettingWord(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE);
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp index b494faef88..0267dd5bb5 100644 --- a/protocols/Tlen/src/tlen.cpp +++ b/protocols/Tlen/src/tlen.cpp @@ -321,7 +321,7 @@ int TlenOnModulesLoaded(void *ptr, WPARAM wParam, LPARAM lParam) /* Set all contacts to offline */
HANDLE hContact = db_find_first();
while (hContact != NULL) {
- char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char *szProto = GetContactProto(hContact);
if (szProto != NULL && !strcmp(szProto, proto->m_szModuleName)) {
if (DBGetContactSettingWord(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
DBWriteContactSettingWord(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE);
diff --git a/protocols/Tlen/src/tlen_muc.cpp b/protocols/Tlen/src/tlen_muc.cpp index 5f3809d806..6990b7e9aa 100644 --- a/protocols/Tlen/src/tlen_muc.cpp +++ b/protocols/Tlen/src/tlen_muc.cpp @@ -959,7 +959,7 @@ static void __cdecl TlenMUCCSendQueryResultThread(void *ptr) queryResult.iItemsNum = 0;
hContact = db_find_first();
while (hContact != NULL) {
- char *str = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char *str = GetContactProto(hContact);
if (str != NULL && !strcmp(str, threadData->proto->m_szModuleName)) {
if (!DBGetContactSettingByte(hContact, threadData->proto->m_szModuleName, "bChat", FALSE)) {
if (!DBGetContactSetting(hContact, threadData->proto->m_szModuleName, "jid", &dbv)) {
@@ -977,7 +977,7 @@ static void __cdecl TlenMUCCSendQueryResultThread(void *ptr) queryResult.iItemsNum = 0;
hContact = db_find_first();
while (hContact != NULL) {
- char *baseProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ char *baseProto = GetContactProto(hContact);
if (baseProto != NULL && !strcmp(baseProto, threadData->proto->m_szModuleName)) {
if (!DBGetContactSettingByte(hContact, threadData->proto->m_szModuleName, "bChat", FALSE)) {
if (!DBGetContactSetting(hContact, threadData->proto->m_szModuleName, "jid", &dbv)) {
diff --git a/protocols/Tlen/src/tlen_userinfo.cpp b/protocols/Tlen/src/tlen_userinfo.cpp index 38463f746c..25f2858d8a 100644 --- a/protocols/Tlen/src/tlen_userinfo.cpp +++ b/protocols/Tlen/src/tlen_userinfo.cpp @@ -138,7 +138,7 @@ int TlenUserInfoInit(void *ptr, WPARAM wParam, LPARAM lParam) if (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM) proto->m_szModuleName))
return 0;
hContact = (HANDLE) lParam;
- szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ szProto = GetContactProto(hContact);
if ((szProto != NULL && !strcmp(szProto, proto->m_szModuleName)) || !lParam) {
odp.cbSize = sizeof(odp);
odp.hInstance = hInst;
|