summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-02-01 10:02:49 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-02-01 10:02:49 +0000
commitb8c1d91a6b8cd0873d9fefa1c978300e99cfb8a3 (patch)
tree4879a7ca87e71d895844e1ceca47b81585d400e7
parent1e924f89a95521efacbb214f986736437de858c1 (diff)
fix for temp default save logic
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@99 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r--metacontacts/meta_services.c12
-rw-r--r--metacontacts/version.h2
2 files changed, 8 insertions, 6 deletions
diff --git a/metacontacts/meta_services.c b/metacontacts/meta_services.c
index e64a27d..e0fd1d3 100644
--- a/metacontacts/meta_services.c
+++ b/metacontacts/meta_services.c
@@ -1042,11 +1042,13 @@ int Meta_MessageWindowEvent(WPARAM wParam, LPARAM lParam) {
MetaAPI_UnforceSendContact((WPARAM)mwed->hContact, 0);
// restore saved default contact
- saved_def = DBGetContactSettingDword(mwed->hContact, META_PROTO, "SavedDefault", -1);
- if(options.temp_default && saved_def != -1) {
- DBWriteContactSettingDword(mwed->hContact, META_PROTO, "Default", saved_def);
- DBWriteContactSettingDword(mwed->hContact, META_PROTO, "SavedDefault", (DWORD)-1);
- NotifyEventHooks(hEventDefaultChanged, (WPARAM)mwed->hContact, (LPARAM)Meta_GetContactHandle(hMeta, saved_def)); // nick set in event handler
+ if(options.set_default_on_recv) {
+ saved_def = DBGetContactSettingDword(mwed->hContact, META_PROTO, "SavedDefault", -1);
+ if(options.temp_default && saved_def != (DWORD)-1) {
+ DBWriteContactSettingDword(mwed->hContact, META_PROTO, "Default", saved_def);
+ DBWriteContactSettingDword(mwed->hContact, META_PROTO, "SavedDefault", (DWORD)-1);
+ NotifyEventHooks(hEventDefaultChanged, (WPARAM)mwed->hContact, (LPARAM)Meta_GetContactHandle(hMeta, saved_def)); // nick set in event handler
+ }
}
}
}
diff --git a/metacontacts/version.h b/metacontacts/version.h
index 5d9c245..1dd3182 100644
--- a/metacontacts/version.h
+++ b/metacontacts/version.h
@@ -5,7 +5,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 12
#define __RELEASE_NUM 2
-#define __BUILD_NUM 6
+#define __BUILD_NUM 7
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM