aboutsummaryrefslogtreecommitdiffstats
path: root/modules/cycle.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-03-08 20:20:58 +0000
committerGravatar Sadie Powell2026-03-08 20:20:58 +0000
commitfa3c7849d3ab085cdb31ea2fa846436d7ed5f642 (patch)
tree673527fc066b92d02ef109f503805abb2c4d9ffc /modules/cycle.cpp
parentFix various minor Doxygen issues. (diff)
downloadinspircd++-fa3c7849d3ab085cdb31ea2fa846436d7ed5f642.tar.gz
inspircd++-fa3c7849d3ab085cdb31ea2fa846436d7ed5f642.tar.bz2
inspircd++-fa3c7849d3ab085cdb31ea2fa846436d7ed5f642.zip
Make the ban checking functions able to check any list mode.
Diffstat (limited to 'modules/cycle.cpp')
-rw-r--r--modules/cycle.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/cycle.cpp b/modules/cycle.cpp
index 8dbff45e6..012e82948 100644
--- a/modules/cycle.cpp
+++ b/modules/cycle.cpp
@@ -32,9 +32,13 @@
class CommandCycle final
: public SplitCommand
{
+private:
+ ChanModeReference banmode;
+
public:
CommandCycle(Module* Creator)
: SplitCommand(Creator, "CYCLE", 1)
+ , banmode(Creator, "ban")
{
penalty = 3000;
syntax = { "<channel> [:<reason>]" };
@@ -59,7 +63,7 @@ public:
if (channel->HasUser(user))
{
- if (channel->GetPrefixValue(user) < VOICE_VALUE && channel->IsBanned(user))
+ if (channel->GetPrefixValue(user) < VOICE_VALUE && channel->CheckList(*banmode, user))
{
// User is banned, send an error and don't cycle them
user->WriteNumeric(ERR_BANNEDFROMCHAN, channel->name, "You may not cycle, as you are banned on channel " + channel->name);