Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

B00mX0r
Copy link
Contributor

@B00mX0r B00mX0r commented Nov 27, 2017

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.

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
Copy link
Contributor Author

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.

@genius3000
Copy link
Member

Just to note it:

override anything blocking them from sending a message to a channel

isn't entirely true as there are still 3 checks in core_privmsg prior to calling OnUserPreMessage; See core_privmsg.cpp:L129-L151
The checks are only ran when the user's prefix value is less than the voice value, but that leaves 'noextmsgmode' (+n) without any override.

@B00mX0r B00mX0r force-pushed the master+filter_override branch 2 times, most recently from 55452ab to 9466f33 Compare November 28, 2017 03:07
@B00mX0r
Copy link
Contributor Author

B00mX0r commented Nov 28, 2017

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.

@SadieCat
Copy link
Member

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.

@SadieCat
Copy link
Member

SadieCat commented Dec 11, 2017

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.
@B00mX0r
Copy link
Contributor Author

B00mX0r commented Dec 12, 2017

@SaberUK conflicts resolved as requested.

@B00mX0r
Copy link
Contributor Author

B00mX0r commented Dec 21, 2017

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.

@SadieCat SadieCat added the blocked This issue or pull request is blocked on another label Dec 22, 2017
@SadieCat
Copy link
Member

SadieCat commented Dec 22, 2017

Marked as blocked until I manage to extract the priority logic for the cross-module event system from the testnet code.

@B00mX0r
Copy link
Contributor Author

B00mX0r commented Jan 31, 2019

@SaberUK Is this slated for 4.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue or pull request is blocked on another
Development

Successfully merging this pull request may close these issues.

None yet

4 participants