mirror of
https://github.com/anope/anope.git
synced 2026-06-27 20:26:38 +02:00
Convert Anope::Debug to an unsigned value.
This commit is contained in:
+3
-4
@@ -390,11 +390,10 @@ bool Anope::Init(int ac, char **av)
|
||||
{
|
||||
if (!arg.empty())
|
||||
{
|
||||
auto level = Anope::Convert<int>(arg, -1);
|
||||
if (level > 0)
|
||||
Anope::Debug = level;
|
||||
else
|
||||
auto level = Anope::TryConvert<unsigned>(arg);
|
||||
if (!level.has_value())
|
||||
throw CoreException("Invalid option given to --debug");
|
||||
Anope::Debug = level.value();
|
||||
}
|
||||
else
|
||||
++Anope::Debug;
|
||||
|
||||
Reference in New Issue
Block a user