Trying to send reason why the player leaves the game.

This commit is contained in:
lotodore
2008-11-25 23:19:34 +00:00
parent b236fa9d62
commit c57ea0985b
15 changed files with 65 additions and 24 deletions
+4 -2
View File
@@ -25,6 +25,8 @@
#include "gametableimpl.h"
#include "startwindowimpl.h"
#include "configfile.h"
#include <net/socket_msg.h>
using namespace std;
@@ -135,12 +137,12 @@ void GuiWrapper::SignalNetClientPlayerChanged(unsigned playerId, const string &n
{
myStartWindow->signalNetClientPlayerChanged(playerId, QString::fromUtf8(newPlayerName.c_str()));
}
void GuiWrapper::SignalNetClientPlayerLeft(unsigned playerId, const string &playerName)
void GuiWrapper::SignalNetClientPlayerLeft(unsigned playerId, const string &playerName, int removeReason)
{
QString tmpName(QString::fromUtf8(playerName.c_str()));
myStartWindow->signalNetClientPlayerLeft(playerId, tmpName);
if (!playerName.empty() && playerName[0] != '#')
myLog->signalLogPlayerLeftMsg(tmpName);
myLog->signalLogPlayerLeftMsg(tmpName, removeReason == NTF_NET_REMOVED_KICKED);
}
void GuiWrapper::SignalNetClientNewGameAdmin(unsigned playerId, const string &playerName) {