From 8389fbba6d92dec84745e5b8db4739f97561585e Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 22 Jan 2023 22:01:25 +0000 Subject: Replace ModeAction with bool. This enum is functionally the same as bool but with weird semantics. --- src/modules/m_messageflood.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules/m_messageflood.cpp') diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index ff919c4bc..324331275 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -78,13 +78,13 @@ public: syntax = "[*]:"; } - 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 */ @@ -95,11 +95,11 @@ public: if ((nlines<2) || (nsecs<1)) { source->WriteNumeric(Numerics::InvalidModeParameter(channel, this, parameter)); - return MODEACTION_DENY; + return false; } ext.SetFwd(channel, ban, nsecs, nlines); - return MODEACTION_ALLOW; + return true; } void SerializeParam(Channel* chan, const floodsettings* fs, std::string& out) -- cgit v1.3.1-10-gc9f91