diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-03-18 13:49:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-03-18 13:49:30 +0300 |
commit | b25682842931ba1414a8c83d8353eb24c7203f92 (patch) | |
tree | 5756f49325095a860fae02e7b5f291620e25c9e3 | |
parent | be1e878453d984584f11587cbba8bb4b223f9943 (diff) | |
download | mv-b25682842931ba1414a8c83d8353eb24c7203f92.tar.gz mv-b25682842931ba1414a8c83d8353eb24c7203f92.tar.bz2 mv-b25682842931ba1414a8c83d8353eb24c7203f92.tar.xz mv-b25682842931ba1414a8c83d8353eb24c7203f92.zip |
Add /gm chat command.
It send message to all online gms.
-rw-r--r-- | data/help/chatcommands.txt | 1 | ||||
-rw-r--r-- | src/commands.cpp | 4 | ||||
-rw-r--r-- | src/commands.h | 3 |
3 files changed, 8 insertions, 0 deletions
diff --git a/data/help/chatcommands.txt b/data/help/chatcommands.txt index d87bfcc30..be1915e5a 100644 --- a/data/help/chatcommands.txt +++ b/data/help/chatcommands.txt @@ -47,6 +47,7 @@ <</dropn - drop N items from any slot.>> <</info - show guild info. Only for native guilds only.>> <</wait NAME - wait for nick or moster with name.>> + <</gm MESSAGE - send message to all online gms.>> ##9<<Trade>> ##2 diff --git a/src/commands.cpp b/src/commands.cpp index 0cc5cee8a..cb40d1a99 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1270,6 +1270,10 @@ impHandler1(talkPet) Net::getChatHandler()->talk(args, GENERAL_CHANNEL); } +impHandler1(gm) +{ + Net::getChatHandler()->talk("@wgm " + args, GENERAL_CHANNEL); +} struct UploadChatInfo { diff --git a/src/commands.h b/src/commands.h index e53d66559..6dd688a17 100644 --- a/src/commands.h +++ b/src/commands.h @@ -133,6 +133,7 @@ namespace Commands decHandler(uploadConfig); decHandler(uploadServerConfig); decHandler(uploadLog); + decHandler(gm); void replaceVars(std::string &str); } // namespace Commands @@ -233,6 +234,7 @@ enum COMMAND_UPLOADCONFIG, COMMAND_UPLOADSERVERCONFIG, COMMAND_UPLOADLOG, + COMMAND_GM, COMMAND_HACK, END_COMMANDS }; @@ -333,6 +335,7 @@ static const CommandInfo commands[] = {"uploadconfig", &Commands::uploadConfig, -1, false}, {"uploadserverconfig", &Commands::uploadServerConfig, -1, false}, {"uploadlog", &Commands::uploadLog, -1, false}, + {"gm", &Commands::gm, -1, true}, {"hack", &Commands::hack, -1, true} }; |