diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/commands.cpp | 5 | ||||
-rw-r--r-- | src/configmanager.cpp | 10 | ||||
-rw-r--r-- | src/gui/widgets/tabs/setup_other.cpp | 5 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 2 |
4 files changed, 21 insertions, 1 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 0a8ef91ba..0f34689ee 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -518,6 +518,11 @@ impHandler(imitation) impHandler0(sendMail) { // +++ need impliment for hercules + if (serverConfig.getBoolValue("enableManaMarketBot")) + { + chatHandler->privateMessage("ManaMarket", "!mail " + event.args); + return true; + } return false; } diff --git a/src/configmanager.cpp b/src/configmanager.cpp index b0f3a28e2..8e130e315 100644 --- a/src/configmanager.cpp +++ b/src/configmanager.cpp @@ -67,6 +67,16 @@ void ConfigManager::initServerConfig(const std::string &serverName) serverConfig.setDefaultValues(getConfigDefaults()); logger->log("serverConfigPath: " + configPath); } + + int val = serverConfig.getValue("enableManaMarketBot", -1); + if (val == -1) + { + if (client->isTmw()) + val = 1; + else + val = 0; + serverConfig.setValue("enableManaMarketBot", val); + } } void ConfigManager::initConfiguration() diff --git a/src/gui/widgets/tabs/setup_other.cpp b/src/gui/widgets/tabs/setup_other.cpp index afa0e9987..4e86abd8c 100644 --- a/src/gui/widgets/tabs/setup_other.cpp +++ b/src/gui/widgets/tabs/setup_other.cpp @@ -295,6 +295,11 @@ Setup_Other::Setup_Other(const Widget2 *const widget) : "guild support"), "", "enableGuildBot", this, "enableGuildBotEvent", false); + // TRANSLATORS: settings option + new SetupItemCheckBox(_("Enable manamarket bot bot support"), + "", "enableManaMarketBot", this, + "enableManaMarketBotEvent", false); + // TRANSLATORS: settings group new SetupItemLabel(_("Keyboard"), "", this); diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index 9c00f0557..1676b19c7 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -2978,7 +2978,7 @@ static const InputActionData inputActionData {"keySendMail", defaultAction(&Actions::sendMail), InputCondition::INGAME, - "mail", + "sendmail|mailsend|mailto", UseArgs_true}, {"keyTradeCommand", defaultAction(&Actions::trade), |