diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-10-03 08:30:12 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-10-03 08:30:12 +0000 |
commit | c0ff232a0112961b4d4e5aa29d6c7cab0664104b (patch) | |
tree | 301e32ca29bdb95191370f17b246dd2e084c3061 | |
parent | f99d18dd83625a753a7171e807b404345b11de4d (diff) |
send to send-offline-files-capable subcontact if we can't find an online file-send-capable one
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@343 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r-- | meta2/proto.cpp | 9 | ||||
-rw-r--r-- | meta2/version.h | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/meta2/proto.cpp b/meta2/proto.cpp index e0760b7..e507ca5 100644 --- a/meta2/proto.cpp +++ b/meta2/proto.cpp @@ -107,7 +107,7 @@ int ProtoGetInfo(WPARAM wParam,LPARAM lParam) { int ProtoGetAwayMsg(WPARAM wParam, LPARAM lParam) {
CCSDATA *ccs = ( CCSDATA* )lParam;
- ccs->hContact = Meta_GetMostOnline(ccs->hContact);
+ ccs->hContact = Meta_GetMostOnlineSupporting(ccs->hContact, PFLAGNUM_1, PF1_MODEMSGRECV);
char *proto = ContactProto(ccs->hContact);
if(!proto)
return 0;
@@ -170,6 +170,7 @@ int ProtoSendMessage(WPARAM wParam, LPARAM lParam) { if (ServiceExists(szTemp))
strncpy(szServiceName, PSS_MESSAGE "W", sizeof(szServiceName));
}
+ // subcontact does not support utf - convert to old ascii/wide format
if((flags & PREF_UTF) && !(CallContactService(most_online, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_IMSENDUTF)) {
ccs->wParam &= ~PREF_UTF;
ccs->wParam |= PREF_UNICODE;
@@ -283,10 +284,8 @@ int ProtoFileSend(WPARAM wParam, LPARAM lParam) { // find the most online contact supporting file send, according to priorities
HANDLE most_online = (HANDLE)Meta_GetMostOnlineSupporting(hMeta, PFLAGNUM_1, PF1_FILESEND);
- TCHAR msg[1024], *proto;
- mir_sntprintf(msg, 1024, _T("Diverting file send to subcontact: %s/%s"), ContactName(most_online), proto = mir_a2t(ContactProto(most_online)));
- mir_free(proto);
- PUShowMessageT(msg, SM_NOTIFY);
+ if(ContactStatus(most_online, ContactProto(most_online)) == ID_STATUS_OFFLINE)
+ most_online = (HANDLE)Meta_GetMostOnlineSupporting(hMeta, PFLAGNUM_4, PF4_OFFLINEFILES);
int result = CallContactService(most_online, PSS_FILE, ccs->wParam, ccs->lParam);
if(result != CALLSERVICE_NOTFOUND) return result;
diff --git a/meta2/version.h b/meta2/version.h index 7e87bdd..2b64a2b 100644 --- a/meta2/version.h +++ b/meta2/version.h @@ -5,7 +5,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 0
#define __RELEASE_NUM 0
-#define __BUILD_NUM 4
+#define __BUILD_NUM 5
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
|