From 712ca58c011123505c807266dcc8d9d84ca1aa44 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Fri, 27 Mar 2009 19:44:23 +0100 Subject: Made eAthena's Network class statically accessible Now the instance doesn't need to be passed into the MessageOut class anymore. Expect a lot of cleanup in the next commit. --- src/gui/widgets/chattab.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/gui/widgets/chattab.cpp') diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp index 715aaf20..c4b2196b 100644 --- a/src/gui/widgets/chattab.cpp +++ b/src/gui/widgets/chattab.cpp @@ -239,9 +239,7 @@ void ChatTab::chatInput(std::string &msg) chatLog(_("Trying to send a blank party message."), BY_SERVER, true); return; } - MessageOut outMsg(chatWindow->mNetwork); - - outMsg.writeInt16(CMSG_PARTY_MESSAGE); + MessageOut outMsg(CMSG_PARTY_MESSAGE); outMsg.writeInt16(length + 4); outMsg.writeString(msg, length); return; @@ -306,8 +304,7 @@ void ChatTab::handleInput(const std::string &msg) { #else std::string mes = player_node->getName() + " : " + msg; - MessageOut outMsg(chatWindow->mNetwork); - outMsg.writeInt16(CMSG_CHAT_MESSAGE); + MessageOut outMsg(CMSG_CHAT_MESSAGE); // Added + 1 in order to let eAthena parse admin commands correctly outMsg.writeInt16(mes.length() + 4 + 1); outMsg.writeString(mes, mes.length() + 1); -- cgit v1.2.3-70-g09d2