diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/commands.cpp | 13 | ||||
-rw-r--r-- | src/actions/commands.h | 1 | ||||
-rw-r--r-- | src/input/inputaction.h | 1 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 5 |
4 files changed, 20 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index c74c2397a..75d491f9e 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -909,4 +909,17 @@ impHandler0(leaveChatRoom) #endif } +impHandler(confSet) +{ + std::string name; + std::string val; + + if (parse2Str(event.args, name, val)) + { + config.setValue(name, val); + return true; + } + return false; +} + } // namespace Actions diff --git a/src/actions/commands.h b/src/actions/commands.h index da3574a62..e2360ad8f 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -85,6 +85,7 @@ namespace Actions decHandler(createPublicChatRoom); decHandler(joinChatRoom); decHandler(leaveChatRoom); + decHandler(confSet); } // namespace Actions #undef decHandler diff --git a/src/input/inputaction.h b/src/input/inputaction.h index 2f4bdcb3c..b927f06f7 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -596,6 +596,7 @@ namespace InputAction LEAVE_ROOM, WINDOW_QUICK_SETTINGS, WINDOW_MAIL, + CONF_SET, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index edd75851a..0aa8adea1 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -4469,6 +4469,11 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputCondition::GAME | InputCondition::NOTARGET, "mailwindow|mail", false}, + {"keyConfSet", + defaultAction(&Actions::confSet), + InputCondition::INGAME, + "confset|setconf", + true}, }; #undef defaultAction |