From 10029599ee4cb4c26531303ab0e07cedc856f1ad Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 25 Aug 2014 21:49:32 +0300 Subject: Remove unused functions. --- src/commands.cpp | 84 -------------------------------------------------------- 1 file changed, 84 deletions(-) (limited to 'src/commands.cpp') 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; -- cgit v1.2.3-60-g2f50