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.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/protocols/Dummy/src/main.cpp b/protocols/Dummy/src/main.cpp
index 1374ed9944..e0c7fb695a 100644
--- a/protocols/Dummy/src/main.cpp
+++ b/protocols/Dummy/src/main.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2014-17 Robert Pösel, 2017-24 Miranda NG team
+Copyright (c) 2014-17 Robert Pösel, 2017-25 Miranda NG team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -54,16 +54,22 @@ 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)) {
- CallService(MS_HISTORY_SHOWCONTACTHISTORY, 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;
}
int CMPlugin::Load()
{
+ InitIcons();
+
HookEvent(ME_CLIST_DOUBLECLICKED, OnDummyDoubleClicked);
return 0;
}
@@ -151,3 +157,12 @@ struct CMPluginMra : public ACCPROTOPLUGIN<CDummyProto>
}
}
static g_pluginMra;
+
+struct CMPluginSkype : public ACCPROTOPLUGIN<CDummyProto>
+{
+ CMPluginSkype() : ACCPROTOPLUGIN<CDummyProto>("SKYPE", pluginInfoEx)
+ {
+ SetUniqueId("SkypeId");
+ }
+}
+static g_pluginSkype;