summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/chathandler.cpp3
-rw-r--r--src/net/eathena/guildhandler.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 19e5c2112..f88d40689 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -107,7 +107,8 @@ void ChatHandler::talk(const std::string &text)
if (!player_node)
return;
- std::string mes = player_node->getName() + " : " + text;
+ std::string mes = std::string(player_node->getName()).append(
+ " : ").append(text);
MessageOut outMsg(CMSG_CHAT_MESSAGE);
// Added + 1 in order to let eAthena parse admin commands correctly
diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp
index e26a252ab..13c0a1f2e 100644
--- a/src/net/eathena/guildhandler.cpp
+++ b/src/net/eathena/guildhandler.cpp
@@ -264,7 +264,8 @@ void GuildHandler::chat(int guildId A_UNUSED, const std::string &text)
if (!player_node)
return;
- std::string str = player_node->getName() + " : " + text;
+ std::string str = std::string(player_node->getName()).append(
+ " : ").append(text);
MessageOut msg(CMSG_GUILD_MESSAGE);
msg.writeInt16(static_cast<uint16_t>(str.size() + 4));
msg.writeString(str, static_cast<int>(str.length()));