summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-11 23:36:41 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-11 23:36:41 +0300
commit12bc5f140a15f28ea57e8904a3858ba633d22b6d (patch)
treeb8137d40b90548aab4780c94919d14ad18eb744b /src/net
parentf43e19ac76dd70bc362d7f498e095c56ab649b61 (diff)
downloadplus-12bc5f140a15f28ea57e8904a3858ba633d22b6d.tar.gz
plus-12bc5f140a15f28ea57e8904a3858ba633d22b6d.tar.bz2
plus-12bc5f140a15f28ea57e8904a3858ba633d22b6d.tar.xz
plus-12bc5f140a15f28ea57e8904a3858ba633d22b6d.zip
add /talkraw chat command for special use.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/chathandler.cpp5
-rw-r--r--src/net/tmwa/chathandler.cpp5
2 files changed, 4 insertions, 6 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 0f247f66e..d8b75bfe6 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -113,9 +113,8 @@ void ChatHandler::talk(const std::string &text,
void ChatHandler::talkRaw(const std::string &mes) const
{
MessageOut outMsg(CMSG_CHAT_MESSAGE);
- // Added + 1 in order to let eAthena parse admin commands correctly
- outMsg.writeInt16(static_cast<int16_t>(mes.length() + 4 + 1));
- outMsg.writeString(mes, static_cast<int>(mes.length() + 1));
+ outMsg.writeInt16(static_cast<int16_t>(mes.length() + 4));
+ outMsg.writeString(mes, static_cast<int>(mes.length()));
}
void ChatHandler::privateMessage(const std::string &recipient,
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index 8f269542c..833e8d4b7 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -141,9 +141,8 @@ void ChatHandler::talk(const std::string &text,
void ChatHandler::talkRaw(const std::string &mes) const
{
MessageOut outMsg(CMSG_CHAT_MESSAGE);
- // Added + 1 in order to let eAthena parse admin commands correctly
- outMsg.writeInt16(static_cast<int16_t>(mes.length() + 4 + 1));
- outMsg.writeString(mes, static_cast<int>(mes.length() + 1));
+ outMsg.writeInt16(static_cast<int16_t>(mes.length() + 4));
+ outMsg.writeString(mes, static_cast<int>(mes.length()));
}
void ChatHandler::privateMessage(const std::string &recipient,