New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CHANMSG oper override #1422
base: master
Are you sure you want to change the base?
Conversation
src/modules/m_override.cpp
Outdated
ServerInstance->SNO->WriteGlobalSno('v',user->nick+" used oper override to send a message on "+channel->name); | ||
return MOD_RES_ALLOW; | ||
} | ||
return MOD_RES_ALLOW; // We already ran FIRST_MOD_RESULT, so if there was no MOD_RES_DENy then they were all passthrus, so there's no point in re-running it anyway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intentionally kept this line instead of removing it (which would work because of line 225) to clarify the line comment on 225. I can remove this if people want me to.
Just to note it:
isn't entirely true as there are still 3 checks in core_privmsg prior to calling OnUserPreMessage; See core_privmsg.cpp:L129-L151 |
55452ab
to
9466f33
Compare
Updated commit message, config file, and PR description to reflect that this only applies to privmsg restrictions from external modules. As agreed to in IRC, moving the definitions of +n, +t, and +b are not in the scope of this PR, though are probably good discussion points for a different issue. |
I'm not sure about this. I think that it would be better to extend support for exemptchanops to more modules (which needs to happen anyway) and then add exemptchanops privileges to oper blocks. |
Can you also resolve the merge conflicts in this? Thanks. |
CHANMSG oper override overrides channel privmsg restrictions from modules, such as m_chanfilter and m_muteban.
9466f33
to
077dfa6
Compare
@SaberUK conflicts resolved as requested. |
Just a note that as I'm working on moving this to OnCheckExemption, I noticed that the events class doesn't currently have a way to set hook priorities that I can see. |
Marked as blocked until I manage to extract the priority logic for the cross-module event system from the testnet code. |
@SaberUK Is this slated for 4.0? |
This allows for opers to override loaded modules blocking them from sending a message to a channel, such as m_chanfilter or m_muteban.
This implements and resolves #1161.