summaryrefslogtreecommitdiff
path: root/messages.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2011-04-01 05:50:42 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2011-04-01 05:50:42 +0300
commit34571247cb430bcc9be56630e9fb0a714b5fd4c8 (patch)
tree84f04ce5aa4110d2eaf1b65578b28cb533531bf5 /messages.cpp
parent8cdda41b119526a2741938d57b7e066e1697315b (diff)
modified: icons.cpp
modified: messages.cpp modified: utilities.cpp
Diffstat (limited to 'messages.cpp')
-rw-r--r--messages.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/messages.cpp b/messages.cpp
index f7ea63f..f421e4a 100644
--- a/messages.cpp
+++ b/messages.cpp
@@ -729,9 +729,12 @@ int SendMsgSvc_func(HANDLE hContact, char *msg, DWORD flags)
if(metaIsSubcontact(hContact))
{
hcontact_data[metaGetContact(hContact)].msgs_to_pass.push_back(str_event);
+ debuglog<<(TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)<<"is subcontact of"<<(TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)metaGetContact(hContact), GCDNF_TCHAR)<<"\n";
+ debuglog<<time_str()<<": adding event to metacontact: "<<(TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)metaGetContact(hContact), GCDNF_TCHAR)<<" on send message.\n";
HistoryLog(metaGetContact(hContact), (char*)str_event.c_str(), EVENTTYPE_MESSAGE, DBEF_SENT|dbflags);
}
hcontact_data[hContact].msgs_to_pass.push_back(str_event);
+ debuglog<<time_str()<<": adding event to contact: "<<(TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)<<" on send message.\n";
HistoryLog(hContact, (char*)str_event.c_str(), EVENTTYPE_MESSAGE, dbflags|DBEF_SENT);
if(!(flags & PREF_UTF))
flags |= PREF_UTF;
@@ -851,6 +854,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(!strcmp((*i).c_str(), (char*)dbei->pBlob))
{
hcontact_data[hContact].msgs_to_pass.erase(i);
+ debuglog<<time_str()<<": event message: \""<<(char*)dbei->pBlob<<"\" passed event filter, contact "<<(TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)<<", message is in allowed list\n";
event_processing_mutex.unlock();
return 0;
}
@@ -860,7 +864,10 @@ int HookSendMsg(WPARAM w, LPARAM l)
return 1;
}
if(!isContactSecured(hContact))
+ {
+ debuglog<<time_str()<<": event message: \""<<(char*)dbei->pBlob<<"\" passed event filter, contact "<<(TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)<<" is unsecured\n";
return 0;
+ }
if(!(dbei->flags & DBEF_SENT) && metaIsProtoMetaContacts((HANDLE)w))
{
char tmp[29];
@@ -869,7 +876,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(strstr(tmp, "-----BEGIN PGP MESSAGE-----"))
return 1;
}
- return 0;
+ return 1;
}