diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-05 14:39:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-05 14:39:04 +0300 |
commit | 53606350048c2145b104cfc09af838db387bdce2 (patch) | |
tree | dc7479610f3fffb98e7a868400149ef7b5767392 | |
parent | dc706af3765b75330e4e7c557ea3e4cf1f119631 (diff) | |
download | manaverse-53606350048c2145b104cfc09af838db387bdce2.tar.gz manaverse-53606350048c2145b104cfc09af838db387bdce2.tar.bz2 manaverse-53606350048c2145b104cfc09af838db387bdce2.tar.xz manaverse-53606350048c2145b104cfc09af838db387bdce2.zip |
Allow send quick mail message by command /sendmail (hercules)
-rw-r--r-- | src/actions/commands.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 0f34689ee..ed017a74c 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -52,6 +52,8 @@ #include "net/guildhandler.h" #ifdef EATHENA_SUPPORT #include "net/homunculushandler.h" +#include "net/mailhandler.h" +#include "net/net.h" #endif #include "net/partyhandler.h" #include "net/serverfeatures.h" @@ -518,6 +520,21 @@ impHandler(imitation) impHandler0(sendMail) { // +++ need impliment for hercules + const ServerTypeT type = Net::getNetworkType(); +#ifdef EATHENA_SUPPORT + if (type == ServerType::EATHENA || type == ServerType::EVOL2) + { + std::string name; + std::string text; + + if (parse2Str(event.args, name, text)) + { + // TRANSLATORS: quick mail message caption + mailHandler->send(name, _("Quick message"), text); + } + } + else +#endif if (serverConfig.getBoolValue("enableManaMarketBot")) { chatHandler->privateMessage("ManaMarket", "!mail " + event.args); |