diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-19 20:28:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-19 20:28:01 +0300 |
commit | dabdb65631b7915ba79ea91c3f79d72381b0691e (patch) | |
tree | 17c7eb578bc5d33ee46b2be064598460bde87446 /src/actions | |
parent | bd5ebdedb78b145120affe161d91389ac27e71ef (diff) | |
download | plus-dabdb65631b7915ba79ea91c3f79d72381b0691e.tar.gz plus-dabdb65631b7915ba79ea91c3f79d72381b0691e.tar.bz2 plus-dabdb65631b7915ba79ea91c3f79d72381b0691e.tar.xz plus-dabdb65631b7915ba79ea91c3f79d72381b0691e.zip |
Add chat command guildnotice for set guild notice message.
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/chat.cpp | 15 | ||||
-rw-r--r-- | src/actions/chat.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp index a3fcef632..a8a7ac827 100644 --- a/src/actions/chat.cpp +++ b/src/actions/chat.cpp @@ -646,4 +646,19 @@ impHandler(chatClipboard) return false; } +impHandler(guildNotice) +{ + if (!localPlayer) + return false; + const std::string args = event.args; + const std::string str1 = args.substr(0, 60); + std::string str2(""); + if (args.size() > 60) + str2 = args.substr(60); + const Guild *const guild = localPlayer->getGuild(); + if (guild) + guildHandler->changeNotice(guild->getId(), str1, str2); + return true; +} + } // namespace Actions diff --git a/src/actions/chat.h b/src/actions/chat.h index 158de5580..b90b97173 100644 --- a/src/actions/chat.h +++ b/src/actions/chat.h @@ -60,6 +60,7 @@ namespace Actions decHandler(chatGuildTab); decHandler(hat); decHandler(chatClipboard); + decHandler(guildNotice); } // namespace Actions #undef decHandler |