diff options
Diffstat (limited to 'src/commands.cpp')
-rw-r--r-- | src/commands.cpp | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 4e4c2ef5f..bc3fc37c7 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -99,90 +99,6 @@ extern char **environ; namespace Commands { -static void outString(const ChatTab *const tab, - const std::string &str, - const std::string &def) -{ - if (!tab) - { - Net::getChatHandler()->me(def, GENERAL_CHANNEL); - return; - } - - switch (tab->getType()) - { - case ChatTabType::PARTY: - { - Net::getPartyHandler()->chat(str); - break; - } - case ChatTabType::GUILD: - { - if (!localPlayer) - return; - const Guild *const guild = localPlayer->getGuild(); - if (guild) - { - if (guild->getServerGuild()) - { - if (tmwServerVersion > 0) - return; - Net::getGuildHandler()->chat(guild->getId(), str); - } - else if (guildManager) - { - guildManager->chat(str); - } - } - break; - } - default: - Net::getChatHandler()->me(def, GENERAL_CHANNEL); - break; - } -} - -static void changeRelation(const std::string &args, - const PlayerRelation::Relation relation, - const std::string &relationText, - ChatTab *const tab) -{ - if (!tab) - return; - - if (args.empty()) - { - // TRANSLATORS: change relation - tab->chatLog(_("Please specify a name."), ChatMsgType::BY_SERVER); - return; - } - - if (player_relations.getRelation(args) == relation) - { - // TRANSLATORS: change relation - tab->chatLog(strprintf(_("Player already %s!"), - relationText.c_str()), ChatMsgType::BY_SERVER); - return; - } - else - { - player_relations.setRelation(args, relation); - } - - if (player_relations.getRelation(args) == relation) - { - // TRANSLATORS: change relation - tab->chatLog(strprintf(_("Player successfully %s!"), - relationText.c_str()), ChatMsgType::BY_SERVER); - } - else - { - // TRANSLATORS: change relation - tab->chatLog(strprintf(_("Player could not be %s!"), - relationText.c_str()), ChatMsgType::BY_SERVER); - } -} - static bool parse2Int(const std::string &args, int &x, int &y) { bool isValid = false; |