diff options
Diffstat (limited to 'src/core/netconnection.cc')
-rw-r--r-- | src/core/netconnection.cc | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/core/netconnection.cc b/src/core/netconnection.cc index 15e57e2..262c956 100644 --- a/src/core/netconnection.cc +++ b/src/core/netconnection.cc @@ -393,10 +393,19 @@ void NetConnection::send_rcon(std::string const &cmdline) this->send_raw(msg); } +// send a "shout" chat message message to the server +void NetConnection::send_shout(std::string const &text) +{ + std::string msg("msg public "); + msg.append(text); + msg += '\n'; + this->send_raw(msg); +} + // send a "say" chat message message to the server void NetConnection::send_say(std::string const &text) { - std::string msg("say "); + std::string msg("msg local "); msg.append(text); msg += '\n'; this->send_raw(msg); @@ -405,7 +414,7 @@ void NetConnection::send_say(std::string const &text) // send a "priv" private message to the server void NetConnection::send_private_message(std::string const &text) { - std::string msg("priv "); + std::string msg("msg private "); msg.append(text); msg += '\n'; this->send_raw(msg); @@ -604,6 +613,12 @@ void NetConnection::parse_incoming_message(const std::string & message) if (message.size() > 9) { application()->notify_message(Message::RCon, message.substr(9)); } + } else if (level == "local") { + // FIXME - separate zone and sender nickname + if (message.size() > 10) { + application()->notify_message(Message::Local, message.substr(10)); + } + } else if (level == "public") { // FIXME - separate sender nickname if (message.size() > 11) { |