diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2013-04-05 18:07:23 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2013-04-05 18:07:23 +0000 |
commit | 17c5cb13ea3d95198daea74c6359fab58b12b058 (patch) | |
tree | c3249c2a8085c86dc7f026a5b03d464c5b5f1c7d /plugins/BuddyPounce/src/main.cpp | |
parent | 43b2c1ada4ff0cfa2d915f888d61a498d05a683f (diff) |
- BuddyPounce - code cleaning, try to fix #295 (patch from person)
git-svn-id: http://svn.miranda-ng.org/main/trunk@4322 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BuddyPounce/src/main.cpp')
-rw-r--r-- | plugins/BuddyPounce/src/main.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 77d86a0afc..f95b995798 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -62,12 +62,10 @@ int MsgAck(WPARAM wParam, LPARAM lParam) if (ack && ack->cbSize==sizeof(ACKDATA)
&& ack->type==ACKTYPE_MESSAGE
- && ack->hProcess==(HANDLE)WindowList_Find(hWindowList,ack->hContact))
- {
+ && ack->hProcess==(HANDLE)WindowList_Find(hWindowList,ack->hContact)) {
if (db_get_b(NULL, modname, "ShowDeliveryMessages", 1))
CreateMessageAcknowlegedWindow(ack->hContact,ack->result == ACKRESULT_SUCCESS);
- if (ack->result == ACKRESULT_SUCCESS)
- {
+ if (ack->result == ACKRESULT_SUCCESS) {
// wrtie it to the DB
DBEVENTINFO dbei = { 0 };
DBVARIANT dbv;
@@ -86,8 +84,7 @@ int MsgAck(WPARAM wParam, LPARAM lParam) // check to reuse
if (reuse > 1)
db_set_b(ack->hContact, modname, "Reuse", (BYTE)(reuse-1));
- else
- {
+ else {
db_set_b(ack->hContact,modname, "Reuse", 0);
db_set_ws(ack->hContact, modname, "PounceMsg", _T(""));
}
@@ -115,8 +112,7 @@ int BuddyPounceOptInit(WPARAM wParam, LPARAM lParam) int statusCheck(int statusFlag, int status)
{
if (statusFlag == ANY || !statusFlag) return 1;
- switch(status)
- {
+ switch(status) {
case ID_STATUS_OFFLINE:
return 0;
case ID_STATUS_ONLINE:
@@ -178,7 +174,7 @@ int UserOnlineSettingChanged(WPARAM wParam,LPARAM lParam) && statusCheck(db_get_w(hContact, modname, "SendIfTheirStatusIsFLAG", 0), newStatus)) {
// check if we r giving up after x days
if (CheckDate(hContact)) {
- if (db_get_b(hContact, modname, "ConfirmTimeout", 0)) {
+ if (db_get_w(hContact, modname, "ConfirmTimeout", 0)) {
struct SendPounceDlgProcStruct *spdps = (struct SendPounceDlgProcStruct *)mir_alloc(sizeof(struct SendPounceDlgProcStruct));
TCHAR *message = mir_tstrdup(dbv.ptszVal); // will get free()ed in the send confirm window proc
spdps->hContact = hContact;
|