summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-05-27 13:21:55 +0100
committerSadie Powell <sadie@witchery.services>2025-05-27 13:21:55 +0100
commit7b2f0f579016f2d8cc8c919704cf1f75d74558db (patch)
tree5bfa89030ffc2a9c23929b52171814c9a380e59a
parent23e72fc934eae5a5fadde21102ec342840956c1f (diff)
Fix some trivial wrong types when getting config values.
-rw-r--r--modules/chanserv/chanserv.cpp2
-rw-r--r--modules/nickserv/ns_sasl.cpp2
-rw-r--r--modules/operserv/os_defcon.cpp2
-rw-r--r--modules/operserv/os_session.cpp6
4 files changed, 6 insertions, 6 deletions
diff --git a/modules/chanserv/chanserv.cpp b/modules/chanserv/chanserv.cpp
index 259a92842..1fdded2d0 100644
--- a/modules/chanserv/chanserv.cpp
+++ b/modules/chanserv/chanserv.cpp
@@ -154,7 +154,7 @@ public:
{
std::deque<ChannelInfo *> chans;
nc->GetChannelReferences(chans);
- int max_reg = Config->GetModule(this).Get<int>("maxregistered");
+ auto max_reg = Config->GetModule(this).Get<uint16_t>("maxregistered");
for (auto *ci : chans)
{
diff --git a/modules/nickserv/ns_sasl.cpp b/modules/nickserv/ns_sasl.cpp
index 44686fc4c..fe1b0e78e 100644
--- a/modules/nickserv/ns_sasl.cpp
+++ b/modules/nickserv/ns_sasl.cpp
@@ -405,7 +405,7 @@ public:
return;
}
- const auto badpasslimit = Config->GetBlock("options").Get<int>("badpasslimit");
+ const auto badpasslimit = Config->GetBlock("options").Get<unsigned>("badpasslimit");
if (!badpasslimit)
return;
diff --git a/modules/operserv/os_defcon.cpp b/modules/operserv/os_defcon.cpp
index 2d32e6a28..e79217219 100644
--- a/modules/operserv/os_defcon.cpp
+++ b/modules/operserv/os_defcon.cpp
@@ -356,7 +356,7 @@ public:
{
const auto &block = conf.GetModule("os_session");
- dconfig.max_session_kill = block.Get<int>("maxsessionkill");
+ dconfig.max_session_kill = block.Get<unsigned>("maxsessionkill");
dconfig.session_autokill_expiry = block.Get<time_t>("sessionautokillexpiry");
dconfig.sle_reason = block.Get<const Anope::string>("sessionlimitexceeded");
dconfig.sle_detailsloc = block.Get<const Anope::string>("sessionlimitdetailsloc");
diff --git a/modules/operserv/os_session.cpp b/modules/operserv/os_session.cpp
index d9df041a3..0b8bf32bd 100644
--- a/modules/operserv/os_session.cpp
+++ b/modules/operserv/os_session.cpp
@@ -661,13 +661,13 @@ public:
{
const auto &block = Config->GetModule(this);
- session_limit = block.Get<int>("defaultsessionlimit");
- max_session_kill = block.Get<int>("maxsessionkill");
+ session_limit = block.Get<unsigned>("defaultsessionlimit");
+ max_session_kill = block.Get<unsigned>("maxsessionkill");
session_autokill_expiry = block.Get<time_t>("sessionautokillexpiry");
sle_reason = block.Get<const Anope::string>("sessionlimitexceeded");
sle_detailsloc = block.Get<const Anope::string>("sessionlimitdetailsloc");
- max_exception_limit = block.Get<int>("maxsessionlimit");
+ max_exception_limit = block.Get<unsigned>("maxsessionlimit");
exception_expiry = block.Get<time_t>("exceptionexpiry");
ipv4_cidr = block.Get<unsigned>("session_ipv4_cidr", "32");