summaryrefslogtreecommitdiff
path: root/src/actions/chat.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-08 12:29:10 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-08 12:29:10 +0300
commitd1c4cb3675600137d0239ac7bdfc91062592804a (patch)
treee09c62c2e8a796bb745e0e3c2ed86810327ea3c5 /src/actions/chat.cpp
parent905bfd0ad38d7101f99f38b00044d9f192cc664d (diff)
downloadplus-d1c4cb3675600137d0239ac7bdfc91062592804a.tar.gz
plus-d1c4cb3675600137d0239ac7bdfc91062592804a.tar.bz2
plus-d1c4cb3675600137d0239ac7bdfc91062592804a.tar.xz
plus-d1c4cb3675600137d0239ac7bdfc91062592804a.zip
Move guild-kick from popup manager into actions.
Diffstat (limited to 'src/actions/chat.cpp')
-rw-r--r--src/actions/chat.cpp30
1 files changed, 30 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)