mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
rooms work mostly
This commit is contained in:
parent
b73001e9fd
commit
80277ff573
25 changed files with 726 additions and 576 deletions
|
|
@ -64,7 +64,7 @@ Servatrice::Servatrice(QObject *parent)
|
|||
}
|
||||
settings->endArray();
|
||||
|
||||
loginMessage = settings->value("messages/login").toString();
|
||||
updateLoginMessage();
|
||||
|
||||
maxGameInactivityTime = settings->value("game/max_game_inactivity_time").toInt();
|
||||
maxPlayerInactivityTime = settings->value("game/max_player_inactivity_time").toInt();
|
||||
|
|
@ -185,6 +185,16 @@ ServerInfo_User *Servatrice::getUserData(const QString &name)
|
|||
return new ServerInfo_User(name, ServerInfo_User::IsUser);
|
||||
}
|
||||
|
||||
void Servatrice::updateLoginMessage()
|
||||
{
|
||||
checkSql();
|
||||
QSqlQuery query;
|
||||
query.prepare("select message from " + dbPrefix + "_servermessages order by timest desc limit 1");
|
||||
if (execSqlQuery(query))
|
||||
if (query.next())
|
||||
loginMessage = query.value(0).toString();
|
||||
}
|
||||
|
||||
void Servatrice::statusUpdate()
|
||||
{
|
||||
uptime += statusUpdateClock->interval() / 1000;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue