Enable sending of a global message box through the irc bot, to inform clients about server reboots.

This commit is contained in:
lotodore
2008-12-26 16:47:14 +00:00
parent 36ef30bedc
commit 23c3ae3849
14 changed files with 196 additions and 6 deletions
+11 -1
View File
@@ -260,7 +260,7 @@ ServerLobbyThread::RemovePlayer(unsigned playerId, unsigned errorCode)
}
void
ServerLobbyThread::SendGlobalNotice(const std::string &message)
ServerLobbyThread::SendGlobalChat(const string &message)
{
boost::shared_ptr<NetPacket> outChat(new NetPacketChatText);
NetPacketChatText::Data outChatData;
@@ -270,6 +270,16 @@ ServerLobbyThread::SendGlobalNotice(const std::string &message)
m_gameSessionManager.SendToAllSessions(GetSender(), outChat, SessionData::Game);
}
void
ServerLobbyThread::SendGlobalMsgBox(const string &message)
{
boost::shared_ptr<NetPacket> outMsg(new NetPacketMsgBoxText);
NetPacketMsgBoxText::Data outMsgData;
outMsgData.text = message;
static_cast<NetPacketMsgBoxText *>(outMsg.get())->SetData(outMsgData);
m_gameSessionManager.SendToAllSessions(GetSender(), outMsg, SessionData::Game);
}
void
ServerLobbyThread::AddComputerPlayer(boost::shared_ptr<PlayerData> player)
{