diff options
| author | 2022-12-11 10:20:26 +0000 | |
|---|---|---|
| committer | 2022-12-11 10:31:00 +0000 | |
| commit | bfee808f26161c738ec4f979c6c68e2bc4ca8131 (patch) | |
| tree | de36449ed06e673ff32e74159f688d55c3b3cd79 /src/users.cpp | |
| parent | Move <oper:autologin> from m_sslinfo to core_oper and rework. (diff) | |
Fix conflicting with a predefined value on Windows.
STRICT is already defined on Windows so we'll need to do something
else here. Thanks Microsoft.
Diffstat (limited to 'src/users.cpp')
| -rw-r--r-- | src/users.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/users.cpp b/src/users.cpp index 0c12dc2fa..db32a681d 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1379,10 +1379,10 @@ OperAccount::OperAccount(const std::string& n, const std::shared_ptr<OperType>& , passwordhash(t->getString("hash", "plaintext", 1)) , type(o ? o->GetName() : n) { - autologin = t->getEnum("autologin", AutoLogin::NEVER, { - { "strict", AutoLogin::STRICT }, - { "relaxed", AutoLogin::RELAXED }, - { "never", AutoLogin::NEVER }, + autologin = t->getEnum("autologin", AL_NEVER, { + { "strict", AL_STRICT }, + { "relaxed", AL_RELAXED }, + { "never", AL_NEVER }, }); if (o) @@ -1401,13 +1401,13 @@ bool OperAccount::CanAutoLogin(LocalUser* user) const { switch (autologin) { - case AutoLogin::STRICT: + case AL_STRICT: return user->nick == GetName(); - case AutoLogin::RELAXED: + case AL_RELAXED: return true; - case AutoLogin::NEVER: + case AL_NEVER: return false; } |
