summaryrefslogtreecommitdiff
path: root/src/core/stdfile
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-07-09 08:30:07 +0000
committerRobert Pösel <robyer@seznam.cz>2014-07-09 08:30:07 +0000
commit047076a15f1588d173e09dbb33f9beb15756f408 (patch)
tree7a184818363ad4d2c99462ccae4e2d71ac57954a /src/core/stdfile
parentb6f230e41a7c206b609336e401e399a332748263 (diff)
Core: Add PF4_GROUPCHATFILES flag to mark protocols that support sending files to group chats
StdFile: Don't show "Send file" menu item for groupchats of protocols that doesn't support it git-svn-id: http://svn.miranda-ng.org/main/trunk@9740 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/stdfile')
-rw-r--r--src/core/stdfile/file.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/stdfile/file.cpp b/src/core/stdfile/file.cpp
index 97b7d9549d..413a202751 100644
--- a/src/core/stdfile/file.cpp
+++ b/src/core/stdfile/file.cpp
@@ -308,7 +308,8 @@ static int SRFilePreBuildMenu(WPARAM wParam, LPARAM)
bool bEnabled = false;
char *szProto = GetContactProto(wParam);
if (szProto != NULL) {
- if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_FILESEND) {
+ bool isChat = db_get_b(wParam, szProto, "ChatRoom", false) != 0;
+ if (CallProtoService(szProto, PS_GETCAPS, isChat ? PFLAGNUM_4 : PFLAGNUM_1, 0) & (isChat ? PF4_GROUPCHATFILES : PF1_FILESEND)) {
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_OFFLINEFILES)
bEnabled = true;
else if (db_get_w(wParam, szProto, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)