summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/chat.cpp30
-rw-r--r--src/actions/chat.h1
2 files changed, 31 insertions, 0 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp
index 5014b24bc..2ac6ec0f1 100644
--- a/src/actions/chat.cpp
+++ b/src/actions/chat.cpp
@@ -456,6 +456,36 @@ impHandler(kickParty)
return true;
}
+impHandler(kickGuild)
+{
+ if (!event.args.empty())
+ {
+ if (localPlayer)
+ {
+ const Guild *const guild = localPlayer->getGuild();
+ if (guild)
+ {
+ if (guild->getServerGuild())
+ guildHandler->kick(guild->getMember(event.args), "");
+#ifdef TMWA_SUPPORT
+ else if (guildManager)
+ guildManager->kick(event.args);
+#endif
+ }
+ }
+ }
+ else
+ {
+ if (event.tab)
+ {
+ // TRANSLATORS: party kick message
+ event.tab->chatLog(_("Please specify a name."),
+ ChatMsgType::BY_SERVER);
+ }
+ }
+ return true;
+}
+
impHandler(addText)
{
if (chatWindow)
diff --git a/src/actions/chat.h b/src/actions/chat.h
index 1aa1778ef..9be293bb8 100644
--- a/src/actions/chat.h
+++ b/src/actions/chat.h
@@ -47,6 +47,7 @@ namespace Actions
decHandler(me);
decHandler(toggle);
decHandler(kickParty);
+ decHandler(kickGuild);
decHandler(addText);
decHandler(clearChat);
decHandler(chatGeneralTab);