diff options
-rw-r--r-- | src/actions/commands.cpp | 20 | ||||
-rw-r--r-- | src/actions/commands.h | 2 | ||||
-rw-r--r-- | src/input/inputaction.h | 2 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 18 |
4 files changed, 42 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 5a7e16334..541a09aa0 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -668,4 +668,24 @@ impHandler(debugSpawn) return true; } +impHandler0(serverIgnoreWhisper) +{ + std::string args = getNick(event); + if (args.empty()) + return false; + + Net::getChatHandler()->ignore(args); + return true; +} + +impHandler0(serverUnIgnoreWhisper) +{ + std::string args = getNick(event); + if (args.empty()) + return false; + + Net::getChatHandler()->unIgnore(args); + return true; +} + } // namespace Actions diff --git a/src/actions/commands.h b/src/actions/commands.h index 46932681c..333afc9eb 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -71,6 +71,8 @@ namespace Actions decHandler(gm); decHandler(hack); decHandler(debugSpawn); + decHandler(serverIgnoreWhisper); + decHandler(serverUnIgnoreWhisper); } // namespace Actions #undef decHandler diff --git a/src/input/inputaction.h b/src/input/inputaction.h index e272cefd4..2ce0518cc 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -478,6 +478,8 @@ namespace InputAction PET_EMOTE_47, PET_EMOTE_48, CATCH_PET, + IGNORE_WHISPER, + UNIGNORE_WHISPER, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index a355c33ba..3e95f4291 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -4044,6 +4044,24 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputCondition::INGAME, "catchpet|catch", true}, + {"keyChatServerIgnoreWhisper", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT | Input::GRP_GUI, + &Actions::serverIgnoreWhisper, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "serverignore", + false}, + {"keyChatServerUnIgnoreWhisper", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT | Input::GRP_GUI, + &Actions::serverUnIgnoreWhisper, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "serverunignore", + false}, }; #endif // INPUT_INPUTACTIONMAP_H |