summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs/chat
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-08-19 20:42:53 +0300
committerAndrei Karas <akaras@inbox.ru>2016-08-19 20:42:53 +0300
commit718714eef1dd302a9426689fff71fd9c13fbacdf (patch)
treede987208fbb8a4eadbed5a0df639bb094a498300 /src/gui/widgets/tabs/chat
parentdabdb65631b7915ba79ea91c3f79d72381b0691e (diff)
downloadmanaplus-718714eef1dd302a9426689fff71fd9c13fbacdf.tar.gz
manaplus-718714eef1dd302a9426689fff71fd9c13fbacdf.tar.bz2
manaplus-718714eef1dd302a9426689fff71fd9c13fbacdf.tar.xz
manaplus-718714eef1dd302a9426689fff71fd9c13fbacdf.zip
Use input manager for most commands in guild tab.
Diffstat (limited to 'src/gui/widgets/tabs/chat')
-rw-r--r--src/gui/widgets/tabs/chat/guildtab.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/gui/widgets/tabs/chat/guildtab.cpp b/src/gui/widgets/tabs/chat/guildtab.cpp
index 4a29d1d31..416a90aa1 100644
--- a/src/gui/widgets/tabs/chat/guildtab.cpp
+++ b/src/gui/widgets/tabs/chat/guildtab.cpp
@@ -27,10 +27,12 @@
#include "const/sound.h"
-#include "net/guildhandler.h"
-
#include "gui/windows/chatwindow.h"
+#include "input/inputmanager.h"
+
+#include "net/guildhandler.h"
+
#include "utils/gettext.h"
#include "debug.h"
@@ -64,19 +66,21 @@ bool GuildTab::handleCommand(const std::string &restrict type,
}
else if (type == "leave" && Ea::taGuild)
{
- guildHandler->leave(Ea::taGuild->getId());
+ inputManager.executeChatCommand(InputAction::LEAVE_GUILD,
+ std::string(),
+ this);
}
else if (type == "kick" && Ea::taGuild)
{
- guildHandler->kick(Ea::taGuild->getMember(args), "");
+ inputManager.executeChatCommand(InputAction::KICK_GUILD,
+ args,
+ this);
}
else if (type == "notice" && Ea::taGuild)
{
- std::string str1 = args.substr(0, 60);
- std::string str2("");
- if (args.size() > 60)
- str2 = args.substr(60);
- guildHandler->changeNotice(Ea::taGuild->getId(), str1, str2);
+ inputManager.executeChatCommand(InputAction::GUILD_NOTICE,
+ args,
+ this);
}
else
{