mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 03:53:26 -08:00
[Server] Expose moderation history reads on the database interface (#7829)
The ban/warn history, session, alt-account, and moderator-login readers existed only on Servatrice_DatabaseInterface, so the socket handler had to hold the concrete class to call them and to ask checkSql() whether the store was reachable. Declare them on Server_DatabaseInterface with empty-list defaults and a checkSql() that reports ready for stores without a connection, mark the Servatrice implementations as overrides, and let those five commands ask the injected interface.
This commit is contained in:
parent
52d8f84ec8
commit
2ca3117765
4 changed files with 56 additions and 16 deletions
|
|
@ -1896,7 +1896,7 @@ void Servatrice_DatabaseInterface::updateUsersLastLoginData(const QString &userN
|
|||
}
|
||||
}
|
||||
|
||||
QList<ServerInfo_Ban> Servatrice_DatabaseInterface::getUserBanHistory(const QString userName)
|
||||
QList<ServerInfo_Ban> Servatrice_DatabaseInterface::getUserBanHistory(const QString &userName)
|
||||
{
|
||||
QList<ServerInfo_Ban> results;
|
||||
ServerInfo_Ban banDetails;
|
||||
|
|
@ -1954,7 +1954,7 @@ bool Servatrice_DatabaseInterface::addWarning(const QString userName,
|
|||
return true;
|
||||
}
|
||||
|
||||
QList<ServerInfo_Warning> Servatrice_DatabaseInterface::getUserWarnHistory(const QString userName)
|
||||
QList<ServerInfo_Warning> Servatrice_DatabaseInterface::getUserWarnHistory(const QString &userName)
|
||||
{
|
||||
QList<ServerInfo_Warning> results;
|
||||
ServerInfo_Warning warnDetails;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue