[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:
BruebachL 2026-11-10 12:16:21 +01:00 • committed by GitHub
parent 52d8f84ec8
commit 2ca3117765
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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;