diff options
| author | 2026-03-08 20:20:58 +0000 | |
|---|---|---|
| committer | 2026-03-08 20:20:58 +0000 | |
| commit | fa3c7849d3ab085cdb31ea2fa846436d7ed5f642 (patch) | |
| tree | 673527fc066b92d02ef109f503805abb2c4d9ffc /modules/cycle.cpp | |
| parent | Fix various minor Doxygen issues. (diff) | |
| download | inspircd++-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.cpp | 6 |
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); |
