summaryrefslogtreecommitdiff
path: root/src/guildmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-28 16:45:10 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-28 16:45:10 +0300
commit6b6fbd4eb1c0122a1c5346f29d54f2aca9b11009 (patch)
tree5a8aa4a48c48ea9d2cbace32e45dffa4acdedf3f /src/guildmanager.cpp
parent69f9daf9fe44bb43bd9112be428438512deca14b (diff)
downloadmv-6b6fbd4eb1c0122a1c5346f29d54f2aca9b11009.tar.gz
mv-6b6fbd4eb1c0122a1c5346f29d54f2aca9b11009.tar.bz2
mv-6b6fbd4eb1c0122a1c5346f29d54f2aca9b11009.tar.xz
mv-6b6fbd4eb1c0122a1c5346f29d54f2aca9b11009.zip
Add support for guild invitation in guild bot integration.
Diffstat (limited to 'src/guildmanager.cpp')
-rw-r--r--src/guildmanager.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/guildmanager.cpp b/src/guildmanager.cpp
index 624193698..12bcf717a 100644
--- a/src/guildmanager.cpp
+++ b/src/guildmanager.cpp
@@ -318,6 +318,14 @@ bool GuildManager::process(std::string msg)
mRequest = true;
return true;
}
+ else if (findCutFirst(msg, "You have been invited to the ")
+ && findCutLast(msg, " guild chat. If you would like to accept "
+ "this invitation please reply \"yes\" and if not then \"no\" ."))
+ {
+ if (socialWindow)
+ socialWindow->showGuildInvite(msg, 1, "");
+ return true;
+ }
else
{
Guild *guild = createGuild();
@@ -388,4 +396,12 @@ void GuildManager::clear()
if (guild)
socialWindow->removeTab(guild);
}
-} \ No newline at end of file
+}
+
+void GuildManager::inviteResponse(bool response)
+{
+ if (response)
+ send("yes");
+ else
+ send("no");
+}