summaryrefslogtreecommitdiff
path: root/src/actions/chat.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-25 13:04:02 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-25 13:04:02 +0300
commite62706843143949918653a03cc0cbf6620687a60 (patch)
tree648b609d88e7e642d6ecd0007780aaee03ee92db /src/actions/chat.cpp
parent4c0d3dc62399e35c288cb82dfbf3f8811328f06c (diff)
downloadplus-e62706843143949918653a03cc0cbf6620687a60.tar.gz
plus-e62706843143949918653a03cc0cbf6620687a60.tar.bz2
plus-e62706843143949918653a03cc0cbf6620687a60.tar.xz
plus-e62706843143949918653a03cc0cbf6620687a60.zip
Move chat command /createparty into actions.
Diffstat (limited to 'src/actions/chat.cpp')
-rw-r--r--src/actions/chat.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp
index 74f3fc691..22d31fbb9 100644
--- a/src/actions/chat.cpp
+++ b/src/actions/chat.cpp
@@ -68,6 +68,9 @@
#include "gui/widgets/tabs/chattab.h"
+#include "net/net.h"
+#include "net/partyhandler.h"
+
#include "utils/gettext.h"
#include "utils/stringutils.h"
@@ -242,4 +245,21 @@ impHandler0(clearChatTab)
return false;
}
+impHandler(createParty)
+{
+ if (!event.tab)
+ return false;
+
+ if (event.args.empty())
+ {
+ // TRANSLATORS: create party message
+ event.tab->chatLog(_("Party name is missing."), ChatMsgType::BY_SERVER);
+ }
+ else
+ {
+ Net::getPartyHandler()->create(event.args);
+ }
+ return true;
+}
+
} // namespace Actions