summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/chat.cpp20
-rw-r--r--src/actions/chat.h1
2 files changed, 21 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
diff --git a/src/actions/chat.h b/src/actions/chat.h
index 8a5e3a3c8..7cb453872 100644
--- a/src/actions/chat.h
+++ b/src/actions/chat.h
@@ -38,6 +38,7 @@ namespace Actions
decHandler(msg);
decHandler(query);
decHandler(clearChatTab);
+ decHandler(createParty);
} // namespace Actions
#undef decHandler