diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-03 17:32:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-03 17:32:37 +0000 |
commit | 31b191bc8ddb639e488ab8306f71ac1dbabf16f0 (patch) | |
tree | aa661023372aa18381e46c7f6fcecf67856ac8ae /plugins/BuddyExpectator | |
parent | 6ba829af4e0c008865675b67b868f33d8e7641df (diff) |
removing built-in Clist Modern extra icons part I
git-svn-id: http://svn.miranda-ng.org/main/trunk@2167 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BuddyExpectator')
-rw-r--r-- | plugins/BuddyExpectator/src/BuddyExpectator.cpp | 56 |
1 files changed, 22 insertions, 34 deletions
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index be864b115f..044808c013 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -561,20 +561,18 @@ int SettingChanged(WPARAM wParam, LPARAM lParam) return 0;
if (DBGetContactSettingByte(hContact, "CList", "NotOnList", 0) == 1)
- return 0;
+ return 0;
char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
if (proto == 0 || (DBGetContactSettingByte(hContact, proto, "ChatRoom", 0) == 1)
- || !(CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND))
+ || !(CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND))
return 0;
int currentStatus = inf->value.wVal;
int prevStatus = DBGetContactSettingWord(hContact, "UserOnline", "OldStatus", ID_STATUS_OFFLINE);
if (currentStatus == prevStatus)
- {
- return 0;
- }
+ return 0;
// Last status
DBWriteContactSettingDword(hContact, MODULE_NAME, "LastStatus", prevStatus);
@@ -610,19 +608,11 @@ int SettingChanged(WPARAM wParam, LPARAM lParam) }
}
- if (currentStatus == ID_STATUS_OFFLINE)
- {
- setLastSeen(hContact);
- return 0;
- }
-
- /*
- if (CallService(MS_IGNORE_ISIGNORED, (WPARAM) hContact, (LPARAM) IGNOREEVENT_USERONLINE))
+ if (currentStatus == ID_STATUS_OFFLINE)
{
setLastSeen(hContact);
- return 0;
+ return 0;
}
- */
if (DBGetContactSettingDword(hContact, MODULE_NAME, "LastSeen", (DWORD)-1) == (DWORD)-1 && options.notifyFirstOnline)
{
@@ -632,35 +622,33 @@ int SettingChanged(WPARAM wParam, LPARAM lParam) }
unsigned int AbsencePeriod = DBGetContactSettingDword(hContact, MODULE_NAME, "iAbsencePeriod", options.iAbsencePeriod);
- if (isContactGoneFor(hContact, AbsencePeriod))
+ if (isContactGoneFor(hContact, AbsencePeriod))
{
- TCHAR* message = TranslateT("has returned after a long absence.");
- time_t tmpTime;
+ TCHAR* message = TranslateT("has returned after a long absence.");
+ time_t tmpTime;
TCHAR tmpBuf[251] = {0};
- tmpTime = getLastSeen(hContact);
- if (tmpTime != -1)
+ tmpTime = getLastSeen(hContact);
+ if (tmpTime != -1)
{
- _tcsftime(tmpBuf, 250, TranslateT("has returned after being absent since %#x"), gmtime(&tmpTime));
- message = tmpBuf;
- }
+ _tcsftime(tmpBuf, 250, TranslateT("has returned after being absent since %#x"), gmtime(&tmpTime));
+ message = tmpBuf;
+ }
else
{
- tmpTime = getLastInputMsg(hContact);
- if (tmpTime != -1)
+ tmpTime = getLastInputMsg(hContact);
+ if (tmpTime != -1)
{
- _tcsftime(tmpBuf, 250, TranslateT("has returned after being absent since %#x"), gmtime(&tmpTime));
- message = tmpBuf;
- }
- }
+ _tcsftime(tmpBuf, 250, TranslateT("has returned after being absent since %#x"), gmtime(&tmpTime));
+ message = tmpBuf;
+ }
+ }
ReturnNotify(hContact, message);
- if ((options.iShowMessageWindow == 0 && options.iShowUDetails == 0) || (options.iShowEvent == 0 && options.iShowPopUp == 0))
- {
+ if ((options.iShowMessageWindow == 0 && options.iShowUDetails == 0) || (options.iShowEvent == 0 && options.iShowPopUp == 0))
setLastSeen(hContact);
- }
- } else
- setLastSeen(hContact);
+ }
+ else setLastSeen(hContact);
return 0;
}
|