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
@@ -138,6 +138,7 @@ startWindowImpl::startWindowImpl(ConfigFile *c)
connect(this, SIGNAL(signalNetClientChatMsg(QString, QString)), myStartNetworkGameDialog, SLOT(receiveChatMsg(QString, QString)));
connect(this, SIGNAL(signalNetClientChatMsg(QString, QString)), myGuiInterface->getMyW()->getMyChat(), SLOT(receiveMessage(QString, QString)));
connect(this, SIGNAL(signalNetClientMsgBox(QString)), this, SLOT(networkMessage(QString)));
connect(this, SIGNAL(signalNetClientShowTimeoutDialog(int, unsigned)), this, SLOT(showTimeoutDialog(int, unsigned)));
@@ -869,6 +870,14 @@ void startWindowImpl::networkNotification(int notificationId)
}
}
void startWindowImpl::networkMessage(QString msg)
{
QMessageBox msgBox(QMessageBox::Information, tr("Server Message"),
msg, QMessageBox::Close, this);
msgBox.setTextFormat(Qt::RichText);
msgBox.exec();
}
void startWindowImpl::networkStart(boost::shared_ptr<Game> game)
{
mySession->startClientGame(game);
+2
View File
@@ -77,6 +77,7 @@ signals:
void signalNetClientGameListPlayerLeft(unsigned gameId, unsigned playerId);
void signalNetClientGameStart(boost::shared_ptr<Game> game);
void signalNetClientChatMsg(QString nickName, QString msg);
void signalNetClientMsgBox(QString msg);
void signalIrcConnect(QString server);
void signalIrcSelfJoined(QString nickName, QString channel);
@@ -109,6 +110,7 @@ public slots:
void networkError(int, int);
void networkNotification(int);
void networkMessage(QString);
void networkStart(boost::shared_ptr<Game> game);
QStringList getPlayerNicksList();