diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-26 22:53:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-26 22:53:07 +0300 |
commit | c7266cda03bcab72b147b5597a126f01f915fe2c (patch) | |
tree | a2d216f146f8ad96c1dd066abbef90cd8eb7002a /src | |
parent | 76fd633b0042f2ab3a161460ee03c1978e7c0db9 (diff) | |
download | manaplus-c7266cda03bcab72b147b5597a126f01f915fe2c.tar.gz manaplus-c7266cda03bcab72b147b5597a126f01f915fe2c.tar.bz2 manaplus-c7266cda03bcab72b147b5597a126f01f915fe2c.tar.xz manaplus-c7266cda03bcab72b147b5597a126f01f915fe2c.zip |
Move chat command /serverignoreall into actions.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/actions.cpp | 6 | ||||
-rw-r--r-- | src/actions/actions.h | 1 | ||||
-rw-r--r-- | src/commands.cpp | 6 | ||||
-rw-r--r-- | src/commands.h | 5 | ||||
-rw-r--r-- | src/input/inputaction.h | 1 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 9 | ||||
-rw-r--r-- | src/input/pages/chat.cpp | 6 |
7 files changed, 24 insertions, 10 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 3111c551f..46a3d74d8 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -872,4 +872,10 @@ impHandler0(dump) } #endif +impHandler0(serverIgnoreAll) +{ + Net::getChatHandler()->ignoreAll(); + return true; +} + } // namespace Actions diff --git a/src/actions/actions.h b/src/actions/actions.h index 5a60e83f9..a731574bb 100644 --- a/src/actions/actions.h +++ b/src/actions/actions.h @@ -69,6 +69,7 @@ namespace Actions decHandler(dirs); decHandler(uptime); decHandler(dump); + decHandler(serverIgnoreAll); } // namespace Actions #undef decHandler diff --git a/src/commands.cpp b/src/commands.cpp index b1c6537f6..b5491a805 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -157,12 +157,6 @@ impHandler(hack) return true; } -impHandler0(serverIgnoreAll) -{ - Net::getChatHandler()->ignoreAll(); - return true; -} - impHandler0(serverUnIgnoreAll) { Net::getChatHandler()->unIgnoreAll(); diff --git a/src/commands.h b/src/commands.h index 9bad6c4ab..d90974eaf 100644 --- a/src/commands.h +++ b/src/commands.h @@ -52,7 +52,6 @@ struct CommandInfo final namespace Commands { decHandler(hack); - decHandler(serverIgnoreAll); decHandler(serverUnIgnoreAll); decHandler(setDrop); decHandler(error) __attribute__ ((noreturn)); @@ -87,8 +86,7 @@ namespace Commands enum { - COMMAND_SERVERIGNOREALL = 0, - COMMAND_SERVERUNIGNOREALL, + COMMAND_SERVERUNIGNOREALL = 0, COMMAND_SETDROP, COMMAND_ERROR, COMMAND_DUMPG, @@ -122,7 +120,6 @@ enum static const CommandInfo commands[] = { - {"serverignoreall", &Commands::serverIgnoreAll, -1, false}, {"serverunignoreall", &Commands::serverUnIgnoreAll, -1, false}, {"setdrop", &Commands::setDrop, -1, true}, {"error", &Commands::error, -1, false}, diff --git a/src/input/inputaction.h b/src/input/inputaction.h index 3d5353deb..572333a3d 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -394,6 +394,7 @@ namespace InputAction REMOVE_ATTACK, ADD_IGNORE_ATTACK, DUMP, + SERVER_IGNORE_ALL, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index ff79cafb3..82973a0cc 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -3315,6 +3315,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputAction::NO_VALUE, 50, InputCondition::INGAME, "dump", + false}, + {"keyServerIgnoreAll", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::serverIgnoreAll, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "serverignoreall", false} }; diff --git a/src/input/pages/chat.cpp b/src/input/pages/chat.cpp index 234892c77..27e239cce 100644 --- a/src/input/pages/chat.cpp +++ b/src/input/pages/chat.cpp @@ -86,6 +86,12 @@ SetupActionData setupActionDataChat[] = }, { // TRANSLATORS: input action name + N_("Ignore all whispers on server side"), + InputAction::SERVER_IGNORE_ALL, + "", + }, + { + // TRANSLATORS: input action name N_("Previous chat line"), InputAction::CHAT_PREV_HISTORY, "", |