diff options
| author | 2023-01-22 22:01:25 +0000 | |
|---|---|---|
| committer | 2023-01-22 22:52:30 +0000 | |
| commit | 8389fbba6d92dec84745e5b8db4739f97561585e (patch) | |
| tree | a1ef829a156d002639035acec8bab8a4e8d1bdfd /src/modules/m_joinflood.cpp | |
| parent | Convert various enums to strongly typed scoped enums. (diff) | |
Replace ModeAction with bool.
This enum is functionally the same as bool but with weird semantics.
Diffstat (limited to 'src/modules/m_joinflood.cpp')
| -rw-r--r-- | src/modules/m_joinflood.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index d31053421..b6c5afb3d 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -101,13 +101,13 @@ public: syntax = "<joins>:<seconds>"; } - ModeAction OnSet(User* source, Channel* channel, std::string& parameter) override + bool OnSet(User* source, Channel* channel, std::string& parameter) override { std::string::size_type colon = parameter.find(':'); if ((colon == std::string::npos) || (parameter.find('-') != std::string::npos)) { source->WriteNumeric(Numerics::InvalidModeParameter(channel, this, parameter)); - return MODEACTION_DENY; + return false; } /* Set up the flood parameters for this channel */ @@ -116,11 +116,11 @@ public: if ((njoins<1) || (nsecs<1)) { source->WriteNumeric(Numerics::InvalidModeParameter(channel, this, parameter)); - return MODEACTION_DENY; + return false; } ext.SetFwd(channel, nsecs, njoins); - return MODEACTION_ALLOW; + return true; } void SerializeParam(Channel* chan, const joinfloodsettings* jfs, std::string& out) |
