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
Fix oper override message when viewing a list mode #1418
base: insp3
Are you sure you want to change the base?
Conversation
30e56ee
to
eb1b5b7
Compare
081adc2
to
a0cb004
Compare
c8046a7
to
9a2f34a
Compare
9a2f34a
to
d935ffb
Compare
Hey, Sorry for taking so long to review this. It seems like I managed to miss it.
Sending an override announcement is valid behaviour when overriding
The hideopers module does not use channels/auspex. It does use users/auspex but only in the context of checking whether an oper can override hideoper which is not relevant to the override module. |
@SaberUK My sincere apologies. The PR description was wrong, as I accidentally referred to the incorrect module. I have rewritten the description to properly reflect the changes that this PR implements. |
cb386fa
to
868d6a7
Compare
include/modules/hidelist.h
Outdated
|
||
#include "event.h" | ||
|
||
class HidelistEventListener : public Events::ModuleEventListener |
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.
HideListEventListwnwe.
include/modules/hidelist.h
Outdated
{ | ||
} | ||
|
||
/** Called whenever a /WHOIS is performed by a local user. |
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.
Update the code documentation too.
include/modules/hidelist.h
Outdated
/** Called whenever a /WHOIS is performed by a local user. | ||
* @param whois Whois context, can be used to send numerics | ||
*/ | ||
virtual ModResult OnListDenied(User* user, Channel* chan, const std::string& modename) = 0; |
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.
Pass a list mode handler here instead of just the name.
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.
We don't have this information in the ModeWatcher class. Also, the mode name just needs to be passed for the m_override snomask announcement.
868d6a7
to
d4e86f3
Compare
d4e86f3
to
5a37438
Compare
I renamed OnListDenied to OnListDeny to better reflect that the denial is dependent on the MOD_RESULT from this call. |
942a758
to
ec7179d
Compare
Targeting v3 instead of v2 because it's in RC stage now |
ec7179d
to
c64c17b
Compare
Currently, oper override executes a MODE override attempt every time a MODE command with a higher adding level than the user has is run. Consequently, this results in an oper override announcement showing when an oper simply did /mode #chan +b to view a list mode rather than modify it.
Because the m_hidelist module explicitly provides for a channels/auspex permission to bypass its restrictions, it is outside of oper override's jurisdiction to touch or care about list modes. This PR makes oper override completely ignore viewing list modes, meaning that a MODE override permission will not replace m_hidelist's channels/auspex requirement for a bypass, and that an oper innocently viewing a listmode will not trigger the override announcement.
This fixes #425.