diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-07-16 16:05:11 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-07-16 16:05:11 +0300 |
commit | 34215e3c3e8eaa5e1c4e6107a185a1821b51c0ce (patch) | |
tree | 6df1f3e7d861b2d1015aef4dd73e13d010425535 /utilities.cpp | |
parent | c4a68366af174e654d5735f244bf3beb8a81b143 (diff) |
modified: commonheaders.h
modified: init.cpp
modified: utilities.cpp
Diffstat (limited to 'utilities.cpp')
-rw-r--r-- | utilities.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utilities.cpp b/utilities.cpp index c21a919..87f4802 100644 --- a/utilities.cpp +++ b/utilities.cpp @@ -79,7 +79,7 @@ int HandleDbNewContact(WPARAM w, LPARAM l) { if(_tcsstr(_T(JUICK_JID), tmp)) { - if(!(*p)->hPrescenseHandler && !(*p)->hMessageHandler && !(*p)->hIqHandler) + if((*p)->hPrescenseHandler == INVALID_HANDLE_VALUE && (*p)->hMessageHandler == INVALID_HANDLE_VALUE && (*p)->hIqHandler == INVALID_HANDLE_VALUE) { IJabberNetInterface *ijnet = (*p)->JabberInterface->Net(); (*p)->hPrescenseHandler = ijnet->AddPresenceHandler((JABBER_HANDLER_FUNC)PrescenseHandler); @@ -104,7 +104,7 @@ int HandleDbContactDeleted(WPARAM w, LPARAM l) { if(_tcsstr(_T(JUICK_JID), tmp)) { - if((*p)->hPrescenseHandler && (*p)->hMessageHandler && (*p)->hIqHandler) + if((*p)->hPrescenseHandler != INVALID_HANDLE_VALUE && (*p)->hMessageHandler != INVALID_HANDLE_VALUE && (*p)->hIqHandler != INVALID_HANDLE_VALUE) { IJabberNetInterface *ijnet = (*p)->JabberInterface->Net(); ijnet->RemoveHandler((*p)->hPrescenseHandler); @@ -145,6 +145,8 @@ static JABBER_HANDLER_FUNC PrescenseHandler(IJabberInterface *ji, HXML node, voi static JABBER_HANDLER_FUNC MessageHandler(IJabberInterface *ji, HXML node, void *pUserData) { + if(!_tcsstr(xi.getAttr(node, 0), _T(JUICK_JID))) + return FALSE; return FALSE; } |