Fix some inappropriate uses of ConvToNum.

This commit is contained in:
Sadie Powell 2025-03-01 18:09:47 +00:00
parent 70716c5c0d
commit f3aa73d5e1
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ public:
bool getBool(const std::string& key, bool def = false) const bool getBool(const std::string& key, bool def = false) const
{ {
return getNum<bool>(key, def); return !!getNum<uint8_t>(key, def);
} }
}; };

View File

@ -92,7 +92,7 @@ void CommandServer::HandleExtra(TreeServer* newserver, Params& params)
if (irc::equals(key, "burst")) if (irc::equals(key, "burst"))
newserver->BeginBurst(ConvToNum<uint64_t>(val)); newserver->BeginBurst(ConvToNum<uint64_t>(val));
else if (irc::equals(key, "hidden")) else if (irc::equals(key, "hidden"))
newserver->Hidden = ConvToNum<bool>(val); newserver->Hidden = !!ConvToNum<uint8_t>(val);
} }
} }