summaryrefslogtreecommitdiff
path: root/protocols/Dummy/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Dummy/src/main.cpp')
-rw-r--r--protocols/Dummy/src/main.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/protocols/Dummy/src/main.cpp b/protocols/Dummy/src/main.cpp
index 034231f0b5..23c47005a4 100644
--- a/protocols/Dummy/src/main.cpp
+++ b/protocols/Dummy/src/main.cpp
@@ -54,13 +54,14 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
static int OnDummyDoubleClicked(WPARAM hContact, LPARAM)
{
if (auto *pa = Proto_GetContactAccount(hContact))
- if (pa->ppro && pa->ppro->GetCaps(1000)) {
- if (Contact::IsGroupChat(hContact))
- CallService(MS_HISTORY_SHOWCONTACTHISTORY, hContact, 0);
- else
- CallService(MS_MSG_SENDMESSAGE, hContact, 0);
- return 1;
- }
+ if (auto *ppro = (CDummyProto*)pa->ppro)
+ if (ppro->GetCaps(1000)) {
+ if (Contact::IsGroupChat(hContact) || !ppro->bAllowSending)
+ CallService(MS_HISTORY_SHOWCONTACTHISTORY, hContact, 0);
+ else
+ CallService(MS_MSG_SENDMESSAGE, hContact, 0);
+ return 1;
+ }
return 0;
}