Preparing admin functions in PokerTH client.
This commit is contained in:
@@ -2179,7 +2179,7 @@ void gameLobbyDialogImpl::reportBadGameName()
|
||||
{
|
||||
assert(mySession);
|
||||
if (myGameListSelectionModel->hasSelection()) {
|
||||
unsigned gameId = selection->selectedRows().first().data(Qt::UserRole).toUInt();
|
||||
unsigned gameId = myGameListSelectionModel->selectedRows().first().data(Qt::UserRole).toUInt();
|
||||
GameInfo info(mySession->getClientGameInfo(gameId));
|
||||
|
||||
int ret = MyMessageBox::question(this, tr("PokerTH - Question"),
|
||||
@@ -2196,14 +2196,14 @@ void gameLobbyDialogImpl::adminActionCloseGame()
|
||||
{
|
||||
assert(mySession);
|
||||
if (myGameListSelectionModel->hasSelection()) {
|
||||
unsigned gameId = selection->selectedRows().first().data(Qt::UserRole).toUInt();
|
||||
unsigned gameId = myGameListSelectionModel->selectedRows().first().data(Qt::UserRole).toUInt();
|
||||
GameInfo info(mySession->getClientGameInfo(gameId));
|
||||
|
||||
int ret = MyMessageBox::question(this, tr("PokerTH - Question"),
|
||||
tr("Are you sure you want to close the game:\n\"%1\"?").arg(QString::fromUtf8(info.name.c_str())), QMessageBox::Yes | QMessageBox::No);
|
||||
|
||||
if(ret == QMessageBox::Yes) {
|
||||
mySession->adminActionCloseGame(gameId);
|
||||
//TODO mySession->adminActionCloseGame(gameId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2212,14 +2212,14 @@ void gameLobbyDialogImpl::adminActionTotalKickBan()
|
||||
{
|
||||
assert(mySession);
|
||||
if (myNickListSelectionModel->hasSelection()) {
|
||||
unsigned playerId = selection->selectedRows().first().data(Qt::UserRole).toUInt();
|
||||
unsigned playerId = myGameListSelectionModel->selectedRows().first().data(Qt::UserRole).toUInt();
|
||||
PlayerInfo info(mySession->getClientPlayerInfo(playerId));
|
||||
|
||||
int ret = MyMessageBox::question(this, tr("PokerTH - Question"),
|
||||
tr("Are you sure you want to total kickban the player: \"%1\"?").arg(QString::fromUtf8(info.playerName.c_str())), QMessageBox::Yes | QMessageBox::No);
|
||||
|
||||
if(ret == QMessageBox::Yes) {
|
||||
mySession->adminActionTotalKickBan(playerId);
|
||||
// TODO mySession->adminActionTotalKickBan(playerId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user