[Server] Expose moderation history reads on the database interface

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:
Lukas Brübach 2026-11-09 20:25:47 +01:00
parent f825903a21
commit 200c00007f
4 changed files with 56 additions and 16 deletions

View file

@ -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;