diff options
Diffstat (limited to 'src/actions/chat.cpp')
-rw-r--r-- | src/actions/chat.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp index 142f9000e..2c7d84f91 100644 --- a/src/actions/chat.cpp +++ b/src/actions/chat.cpp @@ -340,6 +340,32 @@ impHandler(party) return true; } +impHandler(guild) +{ + if (!event.tab || !localPlayer) + return false; + + const std::string args = event.args; + if (!args.empty()) + { + const Guild *const guild = localPlayer->getGuild(); + if (guild) + { + if (guild->getServerGuild()) + guildHandler->invite(guild->getId(), args); + else if (guildManager) + guildManager->invite(args); + } + } + else + { + // TRANSLATORS: guild invite message + event.tab->chatLog(_("Please specify a name."), + ChatMsgType::BY_SERVER); + } + return true; +} + impHandler(me) { outString(event.tab, textToMe(event.args), event.args); |