summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-11-12 11:40:45 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-11-12 12:09:14 +0100
commitd3f698dbad2bc335765ee931781229cc0f0d123d (patch)
treeea839f8470bf272990bc927a707e539ac58984f5 /src/net
parent454c49e4e136ed2a43fd118fcd830f04e114472a (diff)
downloadmana-d3f698dbad2bc335765ee931781229cc0f0d123d.tar.gz
mana-d3f698dbad2bc335765ee931781229cc0f0d123d.tar.bz2
mana-d3f698dbad2bc335765ee931781229cc0f0d123d.tar.xz
mana-d3f698dbad2bc335765ee931781229cc0f0d123d.zip
Removed some Channel and ChannelTab related silliness
* Channel always has a ChannelTab, so need to check it for null * Removed duplicate handling of 'topic' command * No need to set Channel::mTab twice Reviewed-by: Yohann Ferreira
Diffstat (limited to 'src/net')
-rw-r--r--src/net/manaserv/chathandler.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/net/manaserv/chathandler.cpp b/src/net/manaserv/chathandler.cpp
index efb156f0..b6749e7c 100644
--- a/src/net/manaserv/chathandler.cpp
+++ b/src/net/manaserv/chathandler.cpp
@@ -254,12 +254,9 @@ void ChatHandler::handleChatMessage(Net::MessageIn &msg)
std::string userNick = msg.readString();
std::string chatMsg = msg.readString();
- Channel *channel = channelManager->findById(channelId);
- if (channel)
+ if (Channel *channel = channelManager->findById(channelId))
{
- ChannelTab *tab = channel->getTab();
- if (tab)
- tab->chatLog(userNick, chatMsg);
+ channel->getTab()->chatLog(userNick, chatMsg);
}
else
{