aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-04-04 12:10:50 +0100
committerGravatar Sadie Powell2026-04-04 12:32:00 +0100
commitef7c6fe9e2bfb22de66808e56a5f5bd602c3086f (patch)
tree96f67982d63c354a33295997c828fb79462120e6 /modules
parentRename utility/map to container and prefix the difference method. (diff)
Remove the remaining bits of stdalgo to utility/container.
Diffstat (limited to 'modules')
-rw-r--r--modules/callerid.cpp5
-rw-r--r--modules/disable.cpp5
-rw-r--r--modules/ircv3_batch.cpp3
-rw-r--r--modules/kicknorejoin.cpp3
-rw-r--r--modules/monitor.cpp7
-rw-r--r--modules/showfile.cpp3
6 files changed, 16 insertions, 10 deletions
diff --git a/modules/callerid.cpp b/modules/callerid.cpp
index ccbf70862..ceb10b03f 100644
--- a/modules/callerid.cpp
+++ b/modules/callerid.cpp
@@ -33,6 +33,7 @@
#include "modules/ctctags.h"
#include "modules/isupport.h"
#include "numerichelper.h"
+#include "utility/container.h"
enum
{
@@ -154,7 +155,7 @@ struct CallerIDExtInfo final
continue; // shouldn't happen, but oh well.
}
- if (!stdalgo::vector::swaperase(target->wholistsme, dat.get()))
+ if (!insp::swap_erase(target->wholistsme, dat.get()))
ServerInstance->Logs.Debug(MODNAME, "BUG: Inconsistency detected in callerid state, please report (2)");
}
}
@@ -329,7 +330,7 @@ public:
return false;
}
- if (!stdalgo::vector::swaperase(dat2->wholistsme, dat))
+ if (!insp::swap_erase(dat2->wholistsme, dat))
ServerInstance->Logs.Debug(MODNAME, "BUG: Inconsistency detected in callerid state, please report (4)");
user->WriteNotice(whotoremove->nick + " is no longer on your accept list");
diff --git a/modules/disable.cpp b/modules/disable.cpp
index ebed6bb75..91cfc0fe2 100644
--- a/modules/disable.cpp
+++ b/modules/disable.cpp
@@ -21,6 +21,7 @@
#include "modules/isupport.h"
#include "numerichelper.h"
#include "stringutils.h"
+#include "utility/container.h"
enum
{
@@ -161,7 +162,7 @@ public:
if (!fakenonexistent || !user->IsLocal())
return MOD_RES_PASSTHRU; // We're not hiding the numeric OR the user is remote.
- if (!stdalgo::isin(commands, numeric.GetParams()[0]) || user->HasPrivPermission("servers/use-disabled-commands"))
+ if (!insp::contains(commands, numeric.GetParams()[0]) || user->HasPrivPermission("servers/use-disabled-commands"))
return MOD_RES_PASSTHRU; // Wrong command or the user is is an exempt oper.
return MOD_RES_DENY;
@@ -174,7 +175,7 @@ public:
return MOD_RES_PASSTHRU;
// If the command is not disabled or the user has the servers/use-disabled-commands priv we do nothing.
- if (!stdalgo::isin(commands, command) || user->HasPrivPermission("servers/use-disabled-commands"))
+ if (!insp::contains(commands, command) || user->HasPrivPermission("servers/use-disabled-commands"))
return MOD_RES_PASSTHRU;
// The user has tried to execute a disabled command!
diff --git a/modules/ircv3_batch.cpp b/modules/ircv3_batch.cpp
index 940109eef..35d32a04e 100644
--- a/modules/ircv3_batch.cpp
+++ b/modules/ircv3_batch.cpp
@@ -22,6 +22,7 @@
#include "inspircd.h"
#include "modules/cap.h"
#include "modules/ircv3_batch.h"
+#include "utility/container.h"
class BatchMessage final
: public ClientProtocol::Message
@@ -131,7 +132,7 @@ public:
{
// Check the bit first to avoid list scan in case they're not on the list
if ((bits & batch->GetBit()) != 0)
- stdalgo::vector::swaperase(batch->batchinfo->users, user);
+ insp::swap_erase(batch->batchinfo->users, user);
}
}
diff --git a/modules/kicknorejoin.cpp b/modules/kicknorejoin.cpp
index b2a7ca455..739c3d374 100644
--- a/modules/kicknorejoin.cpp
+++ b/modules/kicknorejoin.cpp
@@ -29,6 +29,7 @@
#include "modules/invite.h"
#include "numerichelper.h"
#include "timeutils.h"
+#include "utility/container.h"
class KickRejoinData final
{
@@ -70,7 +71,7 @@ public:
else
{
// Expired record, remove.
- stdalgo::vector::swaperase(kicked, i);
+ insp::swap_erase(kicked, i);
if (kicked.empty())
break;
}
diff --git a/modules/monitor.cpp b/modules/monitor.cpp
index 34b58c989..d0307f54f 100644
--- a/modules/monitor.cpp
+++ b/modules/monitor.cpp
@@ -26,6 +26,7 @@
#include "modules/monitor.h"
#include "numericbuilder.h"
#include "stringutils.h"
+#include "utility/container.h"
namespace IRCv3::Monitor
{
@@ -129,7 +130,7 @@ public:
return WR_TOOMANY;
Entry* entry = AddWatcher(nick, user);
- if (stdalgo::isin(*watched, entry))
+ if (insp::contains(*watched, entry))
return WR_ALREADYWATCHING;
entry->watchers.push_back(user);
@@ -209,11 +210,11 @@ private:
Entry& entry = it->second;
// Erase from the user's list of watched nicks
- if (!stdalgo::vector::swaperase(watchedlist, &entry))
+ if (!insp::swap_erase(watchedlist, &entry))
return false; // User is not watching this nick
// Erase from the nick's list of watching users
- stdalgo::vector::swaperase(entry.watchers, user);
+ insp::swap_erase(entry.watchers, user);
// If nobody else is watching the nick remove map entry
if (entry.watchers.empty())
diff --git a/modules/showfile.cpp b/modules/showfile.cpp
index 154eada96..3418ff7be 100644
--- a/modules/showfile.cpp
+++ b/modules/showfile.cpp
@@ -21,6 +21,7 @@
#include "inspircd.h"
#include "clientprotocolmsg.h"
#include "stringutils.h"
+#include "utility/container.h"
enum
{
@@ -143,7 +144,7 @@ private:
// This is our command, make sure we don't have the same entry twice
sfcmd = static_cast<CommandShowFile*>(handler);
- if (stdalgo::isin(newcmds, sfcmd))
+ if (insp::contains(newcmds, sfcmd))
throw ModuleException(weak_from_this(), "Command " + cmdname + " is already used in a <showfile> tag");
}
else