void TechnicalDetailsSettings::setMod(bool value)
{
	QSettings s;
	s.beginGroup(tecDetails);
	s.setValue("mod", value);
	prefs.mod = value;
	emit modChanged(value);
}
예제 #2
0
void BattleServer::newConnection()
{
    GenericSocket newconnection = server->nextPendingConnection();

    if (!newconnection)
        return;

    int id = freeid();
#ifndef BOOST_SOCKETS
    QString ip = newconnection->peerAddress().toString();
#else
    QString ip = newconnection->ip();
#endif

    print(QString("Received new connection on slot %1 from %2").arg(id).arg(ip));
    ServerConnection *conn = connections[id] = new ServerConnection(newconnection, id);

    connect(conn, SIGNAL(newBattle(int,int,BattlePlayer,BattlePlayer,ChallengeInfo,TeamBattle,TeamBattle)), SLOT(newBattle(int,int,BattlePlayer,BattlePlayer,ChallengeInfo,TeamBattle,TeamBattle)));
    connect(conn, SIGNAL(error(int)), SLOT(onError(int)));
    connect(conn, SIGNAL(modChanged(QString)), SLOT(modChanged(QString)));
    connect(conn, SIGNAL(loadPlugin(QString)), SLOT(loadPlugin(QString)));
    connect(conn, SIGNAL(unloadPlugin(QString)), SLOT(unloadPlugin(QString)));
}