# HG changeset patch # User unc0rr # Date 1361563192 -14400 # Node ID 29e420194558a38588d71d818cca785be8f82b32 # Parent 6f4c2711baa64f68e7f8186cec1ce0b26bde245a Support 'registered only' room flag in frontend diff -r 6f4c2711baa6 -r 29e420194558 QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Fri Feb 22 14:42:57 2013 -0500 +++ b/QTfrontend/hwform.cpp Fri Feb 22 23:59:52 2013 +0400 @@ -1730,6 +1730,7 @@ ui.pageNetGame->setMasterMode(true); ui.pageNetGame->restrictJoins->setChecked(false); ui.pageNetGame->restrictTeamAdds->setChecked(false); + ui.pageNetGame->restrictUnregistered->setChecked(false); ui.pageNetGame->pGameCFG->GameSchemes->setModel(ammoSchemeModel); ui.pageNetGame->pGameCFG->setMaster(true); ui.pageNetGame->pNetTeamsWidget->setInteractivity(true); @@ -1742,6 +1743,7 @@ ui.pageNetGame->leRoomName->disconnect(hwnet); ui.pageNetGame->restrictJoins->disconnect(hwnet); ui.pageNetGame->restrictTeamAdds->disconnect(hwnet); + ui.pageNetGame->restrictUnregistered->disconnect(hwnet); ui.pageNetGame->disconnect(hwnet, SLOT(updateRoomName(const QString&))); ui.pageNetGame->setRoomName(hwnet->getRoom()); @@ -1750,6 +1752,7 @@ connect(ui.pageNetGame, SIGNAL(askForUpdateRoomName(const QString &)), hwnet, SLOT(updateRoomName(const QString &))); connect(ui.pageNetGame->restrictJoins, SIGNAL(triggered()), hwnet, SLOT(toggleRestrictJoins())); connect(ui.pageNetGame->restrictTeamAdds, SIGNAL(triggered()), hwnet, SLOT(toggleRestrictTeamAdds())); + connect(ui.pageNetGame->restrictUnregistered, SIGNAL(triggered()), hwnet, SLOT(toggleRegisteredOnly())); connect(ui.pageNetGame->pGameCFG->GameSchemes->model(), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), ui.pageNetGame->pGameCFG, diff -r 6f4c2711baa6 -r 29e420194558 QTfrontend/net/newnetclient.cpp --- a/QTfrontend/net/newnetclient.cpp Fri Feb 22 14:42:57 2013 -0500 +++ b/QTfrontend/net/newnetclient.cpp Fri Feb 22 23:59:52 2013 +0400 @@ -982,6 +982,11 @@ RawSendNet(QString("TOGGLE_RESTRICT_TEAMS")); } +void HWNewNet::toggleRegisteredOnly() +{ + RawSendNet(QString("TOGGLE_REGISTERED_ONLY")); +} + void HWNewNet::clearAccountsCache() { RawSendNet(QString("CLEAR_ACCOUNTS_CACHE")); diff -r 6f4c2711baa6 -r 29e420194558 QTfrontend/net/newnetclient.h --- a/QTfrontend/net/newnetclient.h Fri Feb 22 14:42:57 2013 -0500 +++ b/QTfrontend/net/newnetclient.h Fri Feb 22 23:59:52 2013 +0400 @@ -163,6 +163,7 @@ void startGame(); void toggleRestrictJoins(); void toggleRestrictTeamAdds(); + void toggleRegisteredOnly(); void partRoom(); void clearAccountsCache(); void getBanList(); diff -r 6f4c2711baa6 -r 29e420194558 QTfrontend/ui/page/pagenetgame.cpp --- a/QTfrontend/ui/page/pagenetgame.cpp Fri Feb 22 14:42:57 2013 -0500 +++ b/QTfrontend/ui/page/pagenetgame.cpp Fri Feb 22 23:59:52 2013 +0400 @@ -170,8 +170,11 @@ restrictJoins->setCheckable(true); restrictTeamAdds = new QAction(QAction::tr("Restrict Team Additions"), menu); restrictTeamAdds->setCheckable(true); + restrictUnregistered = new QAction(QAction::tr("Restrict Unregistered Players Join"), menu); + restrictUnregistered->setCheckable(true); menu->addAction(restrictJoins); menu->addAction(restrictTeamAdds); + menu->addAction(restrictUnregistered); BtnMaster->setMenu(menu); diff -r 6f4c2711baa6 -r 29e420194558 QTfrontend/ui/page/pagenetgame.h --- a/QTfrontend/ui/page/pagenetgame.h Fri Feb 22 14:42:57 2013 -0500 +++ b/QTfrontend/ui/page/pagenetgame.h Fri Feb 22 23:59:52 2013 +0400 @@ -49,6 +49,7 @@ QAction * restrictJoins; QAction * restrictTeamAdds; + QAction * restrictUnregistered; HWChatWidget* chatWidget;