diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-27 16:09:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-27 16:09:15 +0300 |
commit | 32ec83a137def94dbea627350f0318c21afbbc09 (patch) | |
tree | 97bccb560409702d7ecb74d12579946e3a75dd13 /src | |
parent | fc2514926927b709dd59325e83b7da9fd10fa36e (diff) | |
download | mv-32ec83a137def94dbea627350f0318c21afbbc09.tar.gz mv-32ec83a137def94dbea627350f0318c21afbbc09.tar.bz2 mv-32ec83a137def94dbea627350f0318c21afbbc09.tar.xz mv-32ec83a137def94dbea627350f0318c21afbbc09.zip |
Move chat command /talkraw 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 | 6 | ||||
-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, 10 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 63939c1da..e0514f902 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -71,6 +71,7 @@ #include "gui/widgets/tabs/whispertab.h" #include "net/adminhandler.h" +#include "net/chathandler.h" #include "net/guildhandler.h" #include "net/pethandler.h" #include "net/net.h" @@ -656,4 +657,10 @@ impHandler(testParticle) return false; } +impHandler(talkRaw) +{ + Net::getChatHandler()->talkRaw(event.args); + return true; +} + } // namespace Actions diff --git a/src/actions/commands.h b/src/actions/commands.h index d74e8fef8..db0c6eb5e 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -66,6 +66,7 @@ namespace Actions decHandler(disableAway); decHandler(enableAway); decHandler(testParticle); + decHandler(talkRaw); } // namespace Actions #undef decHandler diff --git a/src/commands.cpp b/src/commands.cpp index 960e35994..2a067fb90 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -106,12 +106,6 @@ impHandler(hack) return true; } -impHandler(talkRaw) -{ - Net::getChatHandler()->talkRaw(event.args); - return true; -} - impHandler(talkPet) { // in future probably need add channel detection diff --git a/src/commands.h b/src/commands.h index 462323789..be9000623 100644 --- a/src/commands.h +++ b/src/commands.h @@ -52,7 +52,6 @@ struct CommandInfo final namespace Commands { decHandler(hack); - decHandler(talkRaw); decHandler(talkPet); decHandler(uploadConfig); decHandler(uploadServerConfig); @@ -65,8 +64,7 @@ namespace Commands enum { - COMMAND_TALKRAW = 0, - COMMAND_TALKPET, + COMMAND_TALKPET = 0, COMMAND_UPLOADCONFIG, COMMAND_UPLOADSERVERCONFIG, COMMAND_UPLOADLOG, @@ -78,7 +76,6 @@ enum static const CommandInfo commands[] = { - {"talkraw", &Commands::talkRaw, -1, true}, {"talkpet", &Commands::talkPet, -1, true}, {"uploadconfig", &Commands::uploadConfig, -1, false}, {"uploadserverconfig", &Commands::uploadServerConfig, -1, false}, diff --git a/src/input/inputaction.h b/src/input/inputaction.h index ee8d44a95..65663cd57 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -416,6 +416,7 @@ namespace InputAction ENABLE_AWAY, TEST_PARTICLE, CREATE_ITEMS, + TALK_RAW, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index 9485d46d7..baaee04d1 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -3521,6 +3521,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputAction::NO_VALUE, 50, InputCondition::INGAME, "createitems", + false}, + {"keyTalkRaw", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::talkRaw, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "talkraw", false} }; |