summaryrefslogtreecommitdiff
path: root/src/net/guildhandler.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-04-15 15:42:04 +0000
committerDavid Athay <ko2fan@gmail.com>2008-04-15 15:42:04 +0000
commite2e4ceb9fa8a72ad94853f74724676fff82b15c0 (patch)
tree5336955366e76266f92dbef4da6e632b84714cdf /src/net/guildhandler.cpp
parentd4cc1ded15daa0677e710013640c90b1aadd6bd0 (diff)
downloadmana-e2e4ceb9fa8a72ad94853f74724676fff82b15c0.tar.gz
mana-e2e4ceb9fa8a72ad94853f74724676fff82b15c0.tar.bz2
mana-e2e4ceb9fa8a72ad94853f74724676fff82b15c0.tar.xz
mana-e2e4ceb9fa8a72ad94853f74724676fff82b15c0.zip
Added online status of guild members
Diffstat (limited to 'src/net/guildhandler.cpp')
-rw-r--r--src/net/guildhandler.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/net/guildhandler.cpp b/src/net/guildhandler.cpp
index 494dcdc0..fd23546c 100644
--- a/src/net/guildhandler.cpp
+++ b/src/net/guildhandler.cpp
@@ -99,20 +99,30 @@ void GuildHandler::handleMessage(MessageIn &msg)
if(msg.readInt8() == ERRMSG_OK)
{
std::string guildMember;
+ std::string guildName;
Guild *guild;
+
short guildId = msg.readInt16();
guild = player_node->getGuild(guildId);
+
if (!guild)
return;
+
+ guildName = guild->getName();
+
while(msg.getUnreadLength())
{
guildMember = msg.readString();
if(guildMember != "")
{
guild->addMember(guildMember);
+ guildWindow->setOnline(guildName, guildMember, false);
}
}
+
guildWindow->updateTab();
+
+ Net::ChatServer::getUserList(guildName);
}
} break;
@@ -126,6 +136,7 @@ void GuildHandler::handleMessage(MessageIn &msg)
if (guild)
{
guild->addMember(guildMember);
+ guildWindow->setOnline(guild->getName(), guildMember, false);
}
guildWindow->updateTab();
} break;