From 4125a098905b804758464ef5e2cf87e3425a30ba Mon Sep 17 00:00:00 2001 From: sje Date: Thu, 1 Feb 2007 13:35:16 +0000 Subject: respect 'ForceDefault' for clist dbl-click git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@100 4f64403b-2f21-0410-a795-97e2b3489a10 --- metacontacts/meta_services.c | 3 ++- metacontacts/meta_utils.c | 4 ++-- metacontacts/version.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/metacontacts/meta_services.c b/metacontacts/meta_services.c index e0fd1d3..2d4b1f7 100644 --- a/metacontacts/meta_services.c +++ b/metacontacts/meta_services.c @@ -1151,7 +1151,8 @@ int Meta_ClistDoubleClicked(WPARAM wParam, LPARAM lParam) { } else { - HANDLE most_online = Meta_GetMostOnlineSupporting((HANDLE)wParam, PFLAGNUM_1, 0); + // -1 indicates no specific capability but respect 'ForceDefault' + HANDLE most_online = Meta_GetMostOnlineSupporting((HANDLE)wParam, PFLAGNUM_1, -1); //DBEVENTINFO dbei; char *proto; char buffer[512]; diff --git a/metacontacts/meta_utils.c b/metacontacts/meta_utils.c index 8758c3b..7ece0fe 100644 --- a/metacontacts/meta_utils.c +++ b/metacontacts/meta_utils.c @@ -485,8 +485,8 @@ HANDLE Meta_GetMostOnlineSupporting(HANDLE hMeta, int pflagnum, unsigned long ca proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)most_online_contact, 0); caps = proto ? CallProtoService(proto, PS_GETCAPS, (WPARAM)pflagnum, 0) : 0; if(proto && strcmp(proto, "IRC") == 0) caps |= PF1_IM; - // we are forced to do use default for sending - if(proto && (caps & capability) == capability && DBGetContactSettingByte(hMeta, META_PROTO, "ForceDefault", 0) && capability != 0) // capability is 0 when we're working out status + // we are forced to do use default for sending - '-1' capability indicates no specific capability, but respect 'Force Default' + if(proto && DBGetContactSettingByte(hMeta, META_PROTO, "ForceDefault", 0) && capability != 0 && (capability == -1 || (caps & capability) == capability)) // capability is 0 when we're working out status return most_online_contact; // a subcontact is being temporarily 'forced' to do sending diff --git a/metacontacts/version.h b/metacontacts/version.h index 1dd3182..3c6473e 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 7 +#define __BUILD_NUM 8 #define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM #define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM -- cgit v1.2.3