diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-26 09:42:43 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-26 09:42:43 -0600 |
commit | 9e4a8ea095a1a0613d7b128f4e29c69643137b07 (patch) | |
tree | 82dfb0a17dfc3439554efc77a3d18bf5165cebc3 /src/net/tmwserv/guildhandler.cpp | |
parent | cdcadf6e99a6deaa5b929cdec9736ab1fb280f65 (diff) | |
download | mana-9e4a8ea095a1a0613d7b128f4e29c69643137b07.tar.gz mana-9e4a8ea095a1a0613d7b128f4e29c69643137b07.tar.bz2 mana-9e4a8ea095a1a0613d7b128f4e29c69643137b07.tar.xz mana-9e4a8ea095a1a0613d7b128f4e29c69643137b07.zip |
Add ChannelTab for chat channels
This fixes TMWServ compilation form the previous commit.
Diffstat (limited to 'src/net/tmwserv/guildhandler.cpp')
-rw-r--r-- | src/net/tmwserv/guildhandler.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/net/tmwserv/guildhandler.cpp b/src/net/tmwserv/guildhandler.cpp index b3ddec6c..5927f175 100644 --- a/src/net/tmwserv/guildhandler.cpp +++ b/src/net/tmwserv/guildhandler.cpp @@ -28,8 +28,9 @@ #include "chatserver/chatserver.h" #include "chatserver/guild.h" -#include "../../gui/guildwindow.h" +#include "../../gui/widgets/channeltab.h" #include "../../gui/chat.h" +#include "../../gui/guildwindow.h" #include "../../guild.h" #include "../../log.h" #include "../../localplayer.h" @@ -208,7 +209,8 @@ void GuildHandler::handleMessage(MessageIn &msg) Guild *guild = player_node->getGuild(guildId); if (guild) { - chatWindow->removeChannel(guild->getName()); + Channel *channel = channelManager->findByName(guild->getName()); + chatWindow->removeTab(channel->getTab()); guildWindow->removeTab(guildId); player_node->removeGuild(guildId); } @@ -235,6 +237,6 @@ void GuildHandler::joinedGuild(MessageIn &msg) // COMMENT: Should this go here?? Channel *channel = new Channel(channelId, guildName, announcement); channelManager->addChannel(channel); - chatWindow->createNewChannelTab(guildName); + chatWindow->addTab(new ChannelTab(channel)); chatWindow->chatLog("Topic: " + announcement, BY_CHANNEL, guildName); } |