diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-19 20:42:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-19 20:42:53 +0300 |
commit | 718714eef1dd302a9426689fff71fd9c13fbacdf (patch) | |
tree | de987208fbb8a4eadbed5a0df639bb094a498300 /src/gui/widgets | |
parent | dabdb65631b7915ba79ea91c3f79d72381b0691e (diff) | |
download | mv-718714eef1dd302a9426689fff71fd9c13fbacdf.tar.gz mv-718714eef1dd302a9426689fff71fd9c13fbacdf.tar.bz2 mv-718714eef1dd302a9426689fff71fd9c13fbacdf.tar.xz mv-718714eef1dd302a9426689fff71fd9c13fbacdf.zip |
Use input manager for most commands in guild tab.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/tabs/chat/guildtab.cpp | 22 |
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 { |