diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-10-17 22:07:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-10-17 22:07:24 +0300 |
commit | d14bb7a27ee23cc83b3af1db2f1976eaaa55d78a (patch) | |
tree | 5f128768c66436eefd70632f02889607596609d4 /src/commandhandler.cpp | |
parent | f1e92aca00a4859047e83fab76220767b9a2f814 (diff) | |
parent | e93e6beb456d105987da3190c2a80847b6900081 (diff) | |
download | mv-stripped1.1.10.16.tar.gz mv-stripped1.1.10.16.tar.bz2 mv-stripped1.1.10.16.tar.xz mv-stripped1.1.10.16.zip |
Merge branch 'master' into strippedstripped1.1.10.16
Conflicts:
data/fonts/mplus-1p-bold.ttf
data/fonts/mplus-1p-regular.ttf
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r-- | src/commandhandler.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index 189485461..f1b7518c5 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -112,6 +112,8 @@ void CommandHandler::handleCommand(const std::string &command, ChatTab *tab) handleDisregard(args, tab); else if (type == "neutral") handleNeutral(args, tab); + else if (type == "blacklist") + handleBlackList(args, tab); else if (type == "erase") handleErase(args, tab); else if (type == "join") @@ -523,9 +525,10 @@ void CommandHandler::handleUnignore(const std::string &args, ChatTab *tab) return; } - if (player_relations.getRelation(args) == PlayerRelation::IGNORED) + if (player_relations.getRelation(args) != PlayerRelation::NEUTRAL + && player_relations.getRelation(args) != PlayerRelation::FRIEND) { - player_relations.removePlayer(args); + player_relations.setRelation(args, PlayerRelation::NEUTRAL); } else { @@ -536,13 +539,17 @@ void CommandHandler::handleUnignore(const std::string &args, ChatTab *tab) if (tab) { - if (player_relations.getRelation(args) != PlayerRelation::IGNORED) + if (player_relations.getRelation(args) == PlayerRelation::NEUTRAL) tab->chatLog(_("Player no longer ignored!"), BY_SERVER); else tab->chatLog(_("Player could not be unignored!"), BY_SERVER); } } +void CommandHandler::handleBlackList(const std::string &args, ChatTab *tab) +{ + changeRelation(args, PlayerRelation::BLACKLISTED, _("blacklisted"), tab); +} void CommandHandler::handleErase(const std::string &args, ChatTab *tab) { |