diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-30 13:33:28 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-30 13:33:28 +0000 |
commit | b8a02a2b98e7b0e6a8a54cb140a873039d9c6d3d (patch) | |
tree | 8dd46393de0047d87492a37e4ab057f143153aa8 /plugins/SeenPlugin | |
parent | b0632a264c7ce0120af88e915a455c3167f1d5c5 (diff) |
- setting thread names;
- warning fixes;
- code cleaning;
- option to disable sounds during idle
git-svn-id: http://svn.miranda-ng.org/main/trunk@692 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SeenPlugin')
-rw-r--r-- | plugins/SeenPlugin/utils.cpp | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/plugins/SeenPlugin/utils.cpp b/plugins/SeenPlugin/utils.cpp index e33d6edfa0..533882977e 100644 --- a/plugins/SeenPlugin/utils.cpp +++ b/plugins/SeenPlugin/utils.cpp @@ -596,36 +596,22 @@ int addContactToQueue(HANDLE hContact){ static DWORD __stdcall waitThread(logthread_info* infoParam)
{
-// char str[MAXMODULELABELLENGTH];
-// sprintf(str,"In Thread: %s; %s; %s\n",
-// infoParam->sProtoName,
-// (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)infoParam->hContact,0),
-// (const char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,(WPARAM)infoParam->courStatus,0)
-// );
-// OutputDebugStringA(str);
WORD prevStatus = DBGetContactSettingWord(infoParam->hContact,S_MOD,"StatusTriger",ID_STATUS_OFFLINE);
Sleep(1500); // I hope in 1.5 second all the needed info will be set
- if (includeIdle){
- if (DBGetContactSettingDword(infoParam->hContact,infoParam->sProtoName,"IdleTS",0)) {
+ if (includeIdle)
+ if (DBGetContactSettingDword(infoParam->hContact,infoParam->sProtoName,"IdleTS",0))
infoParam->courStatus &=0x7FFF;
- }
- }
+
if (infoParam->courStatus != prevStatus){
DBWriteContactSettingWord(infoParam->hContact,S_MOD,"OldStatus",(WORD)(prevStatus|0x8000));
- if (includeIdle){
+ if (includeIdle)
DBWriteContactSettingByte(infoParam->hContact,S_MOD,"OldIdle",(BYTE)((prevStatus&0x8000)==0));
- }
+
DBWriteContactSettingWord(infoParam->hContact,S_MOD,"StatusTriger",infoParam->courStatus);
}
-// sprintf(str,"OutThread: %s; %s; %s\n",
-// infoParam->sProtoName,
-// (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)infoParam->hContact,0),
-// (const char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,(WPARAM)infoParam->courStatus,0)
-// );
-// infoParam->hContact = 0; //declare the slot as empty
+
contactQueue[infoParam->queueIndex] = 0;
free(infoParam);
-// OutputDebugStringA(str);
return 0;
}
|