aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-07-03 15:27:31 +0100
committerGravatar Sadie Powell2023-07-03 18:43:31 +0100
commitfc160b34142dd0645ea914fe5af40be2cf25cff7 (patch)
tree78ed39e0d5b5794a2326dce1b570261f0ed93992
parentRefactor the ServerConfig class. (diff)
Make MaxTargets a size_t.
-rw-r--r--include/configreader.h2
-rw-r--r--src/commands.cpp2
-rw-r--r--src/configreader.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/include/configreader.h b/include/configreader.h
index 7b65980e1..3f3712f8f 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -454,7 +454,7 @@ public:
time_t TimeSkipWarn;
/** The maximum number of targets for a multi-target command (e.g. KICK). */
- unsigned long MaxTargets;
+ size_t MaxTargets;
/** The maximum amount of data to read from a socket in one go. */
size_t NetBufferSize;
diff --git a/src/commands.cpp b/src/commands.cpp
index 1707a173f..716506459 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -64,7 +64,7 @@ bool CommandParser::LoopCall(User* user, Command* handler, const CommandBase::Pa
irc::commasepstream items1(parameters[splithere]);
irc::commasepstream items2(extra >= 0 ? parameters[extra] : "", true);
std::string item;
- unsigned int max = 0;
+ size_t max = 0;
LocalUser* localuser = IS_LOCAL(user);
/* Attempt to iterate these lists and call the command handler
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 8c3038b6c..363bc16c4 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -343,7 +343,7 @@ void ServerConfig::Fill()
CustomVersion = security->getString("customversion");
HideLines = security->getString("hidelines", security->getBool("hidebans") ? "%type%-lined" : "");
HideServer = security->getString("hideserver", {}, InspIRCd::IsFQDN);
- MaxTargets = security->getNum<unsigned long>("maxtargets", 5, 1, 50);
+ MaxTargets = security->getNum<size_t>("maxtargets", 5, 1, 50);
// Read the <cidr> config.
const auto& cidr = ConfValue("cidr");