diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/manaserv/chathandler.cpp | 7 |
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 { |