KimLS 04d947a40e Newer versions of libmariadb default to tls forced on, return to the default of not forcing that.
auto_login were breaking on linux builds
loginserver wasn't setting proper openssl compile flag
2025-12-07 21:17:13 -08:00

38 lines
783 B
C++

#include "../../client.h"
#include "../../../common/repositories/account_repository.h"
void ShowAutoLogin(Client* c, const Seperator* sep)
{
if (!RuleB(World, EnableAutoLogin)) {
c->Message(Chat::White, "Auto login is disabled.");
return;
}
Client* t = c;
if (c->GetGM() && c->GetTarget() && c->GetTarget()->IsClient()) {
t = c->GetTarget()->CastToClient();
}
const auto& e = AccountRepository::FindOne(database, t->AccountID());
if (!e.id) {
c->Message(
Chat::White,
fmt::format(
"Failed to find an account entry for {}.",
c->GetTargetDescription(t)
).c_str()
);
return;
}
c->Message(
Chat::White,
fmt::format(
"Auto login character for {} is set to '{}'.",
c->GetTargetDescription(t),
e.auto_login_charname
).c_str()
);
}