diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-25 13:16:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-25 13:16:08 +0300 |
commit | 4bb530a447cc08fbe176cface478898e0b35f5d1 (patch) | |
tree | ad7bdb01082b133108cccb9e24080c00a2983591 /src/actions | |
parent | b063ffa91bbeb324568ae84cde9a90fbb28797f7 (diff) | |
download | plus-4bb530a447cc08fbe176cface478898e0b35f5d1.tar.gz plus-4bb530a447cc08fbe176cface478898e0b35f5d1.tar.bz2 plus-4bb530a447cc08fbe176cface478898e0b35f5d1.tar.xz plus-4bb530a447cc08fbe176cface478898e0b35f5d1.zip |
Move chat command /party into actions.
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/chat.cpp | 17 | ||||
-rw-r--r-- | src/actions/chat.h | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp index 58642db29..be6c88bbe 100644 --- a/src/actions/chat.cpp +++ b/src/actions/chat.cpp @@ -281,4 +281,21 @@ impHandler(createGuild) return true; } +impHandler(party) +{ + if (!event.tab) + return false; + + if (!event.args.empty()) + { + Net::getPartyHandler()->invite(event.args); + } + else + { + // TRANSLATORS: party invite message + event.tab->chatLog(_("Please specify a name."), ChatMsgType::BY_SERVER); + } + return true; +} + } // namespace Actions diff --git a/src/actions/chat.h b/src/actions/chat.h index 7bfb96aff..c575827fd 100644 --- a/src/actions/chat.h +++ b/src/actions/chat.h @@ -40,6 +40,7 @@ namespace Actions decHandler(clearChatTab); decHandler(createParty); decHandler(createGuild); + decHandler(party); } // namespace Actions #undef decHandler |