Allow the server to send a global notice to all players (for example if a server reboot is going to happen). Does not work with current client version 0.6.3.

This commit is contained in:
lotodore
2008-12-26 13:50:09 +00:00
parent 5623e0865d
commit 4f48fdbe2a
4 changed files with 50 additions and 6 deletions
+13
View File
@@ -147,6 +147,19 @@ ServerManager::SignalIrcChatMsg(const std::string &nickName, const std::string &
m_ircThread->SendChatMessage(statStream.str());
}
}
else if (command == "msg")
{
while (msgStream.peek() == ' ')
msgStream.get();
string message(msgStream.str().substr(msgStream.tellg()));
if (!message.empty())
{
GetLobbyThread().SendGlobalNotice(message);
m_ircThread->SendChatMessage(nickName + ": Global notice sent.");
}
else
m_ircThread->SendChatMessage(nickName + ": Invalid message.");
}
else
m_ircThread->SendChatMessage(nickName + ": Invalid command \"" + command + "\".");
}