[Commands] Move #suspend from content database (#3651)

This commit is contained in:
JJ 2023-10-23 20:01:49 -04:00 committed by GitHub
parent 508ecec6ea
commit 4d9b51df0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ void command_suspend(Client *c, const Seperator *sep)
const std::string reason = sep->arg[3] ? sep->argplus[3] : ""; const std::string reason = sep->arg[3] ? sep->argplus[3] : "";
auto l = AccountRepository::GetWhere( auto l = AccountRepository::GetWhere(
content_db, database,
fmt::format( fmt::format(
"LOWER(charname) = '{}'", "LOWER(charname) = '{}'",
Strings::Escape(character_name) Strings::Escape(character_name)
@ -41,7 +41,7 @@ void command_suspend(Client *c, const Seperator *sep)
l[0].suspendeduntil = std::time(nullptr) + (days * 86400); l[0].suspendeduntil = std::time(nullptr) + (days * 86400);
l[0].suspend_reason = reason; l[0].suspend_reason = reason;
if (!AccountRepository::UpdateOne(content_db, l[0])) { if (!AccountRepository::UpdateOne(database, l[0])) {
c->Message( c->Message(
Chat::White, Chat::White,
fmt::format( fmt::format(