From b76ff64daeeb1e1081cff93c611f730e5b1b051e Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 20 Oct 2017 08:01:27 +0100 Subject: Enable using m_customprefix to alter core prefix modes. This replaces the devoice module which has now been removed. If you want users to be able to devoice themselves then you can load the customprefix module add the following config tag: If you wish to keep identical behaviour rather than allowing users to use "MODE #YourChannel -v TheirNick" then you can load the alias module and add the following config tag: --- src/mode.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/mode.cpp') diff --git a/src/mode.cpp b/src/mode.cpp index fd25a9a9f..98b0f9854 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -198,6 +198,14 @@ ModeAction PrefixMode::OnModeChange(User* source, User*, Channel* chan, std::str return (memb->SetPrefix(this, adding) ? MODEACTION_ALLOW : MODEACTION_DENY); } +void PrefixMode::Update(unsigned int rank, unsigned int setrank, unsigned int unsetrank, bool selfrm) +{ + prefixrank = rank; + ranktoset = setrank; + ranktounset = unsetrank; + selfremove = selfrm; +} + ModeAction ParamModeBase::OnModeChange(User* source, User*, Channel* chan, std::string& parameter, bool adding) { if (adding) -- cgit v1.3.1-10-gc9f91