diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-24 21:32:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-24 21:32:16 +0300 |
commit | 9522e88dbdb425211f68e94518dcfb63dc74f306 (patch) | |
tree | fcef589c7eeb62042baa162b8afc2a21a74c01f2 /src | |
parent | 4b5a38945c47d492fe8e4581b2d92956a689612e (diff) | |
download | mv-9522e88dbdb425211f68e94518dcfb63dc74f306.tar.gz mv-9522e88dbdb425211f68e94518dcfb63dc74f306.tar.bz2 mv-9522e88dbdb425211f68e94518dcfb63dc74f306.tar.xz mv-9522e88dbdb425211f68e94518dcfb63dc74f306.zip |
Move chat command /blacklist into actions.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/commands.cpp | 7 | ||||
-rw-r--r-- | src/actions/commands.h | 1 | ||||
-rw-r--r-- | src/commands.cpp | 7 | ||||
-rw-r--r-- | src/commands.h | 5 | ||||
-rw-r--r-- | src/input/inputaction.h | 1 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 9 |
6 files changed, 19 insertions, 11 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index aba86a87f..79ca62973 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -205,4 +205,11 @@ impHandler(chatNeutral) return true; } +impHandler(chatBlackList) +{ + // TRANSLATORS: blacklist command + changeRelation(event.args, PlayerRelation::BLACKLISTED, _("blacklisted"), event.tab); + return true; +} + } // namespace Actions diff --git a/src/actions/commands.h b/src/actions/commands.h index 32a8155c7..9faa40b92 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -33,6 +33,7 @@ namespace Actions decHandler(chatFriend); decHandler(chatDisregard); decHandler(chatNeutral); + decHandler(chatBlackList); } // namespace Actions #undef decHandler diff --git a/src/commands.cpp b/src/commands.cpp index 7105215c3..ac674b346 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -384,13 +384,6 @@ impHandler0(present) return false; } -impHandler(blackList) -{ - // TRANSLATORS: blacklist command - changeRelation(event.args, PlayerRelation::BLACKLISTED, _("blacklisted"), event.tab); - return true; -} - impHandler(enemy) { // TRANSLATORS: enemy command diff --git a/src/commands.h b/src/commands.h index 29ffcf402..8ca68ece0 100644 --- a/src/commands.h +++ b/src/commands.h @@ -59,7 +59,6 @@ namespace Commands decHandler(me); decHandler(toggle); decHandler(present); - decHandler(blackList); decHandler(enemy); decHandler(erase); decHandler(quit); @@ -129,8 +128,7 @@ namespace Commands enum { - COMMAND_BLACKLIST = 0, - COMMAND_ENEMY, + COMMAND_ENEMY = 0, COMMAND_ERASE, COMMAND_CLEANGRAPHICS, COMMAND_CLEANFONTS, @@ -207,7 +205,6 @@ enum static const CommandInfo commands[] = { - {"blacklist", &Commands::blackList, -1, true}, {"enemy", &Commands::enemy, -1, true}, {"erase", &Commands::erase, -1, true}, {"cleangraphics", &Commands::cleanGraphics, -1, false}, diff --git a/src/input/inputaction.h b/src/input/inputaction.h index 74ac06c13..69027cda0 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -355,6 +355,7 @@ namespace InputAction FRIEND, DISREGARD, NEUTRAL, + BLACKLIST, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index 4ee1113e6..df00c1a25 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -2964,6 +2964,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputAction::NO_VALUE, 50, InputCondition::INGAME, "neutral", + true}, + {"keyBlacklist", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::chatBlackList, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "blacklist", true} }; |