[DONE] Prevent chanops and higher from getting banned

These are old archives. They are kept for historic purposes only.

Moderators: Gottem, Supporters

Post Reply
Gottem
UnrealIRCd coder
Posts: 192
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

[DONE] Prevent chanops and higher from getting banned

Post by Gottem »

This module prevents chanops/hops from banning anyone who has +o, +a and/or +q. It will check every banmask against people who have any of those list modes, using both their vhost and cloaked host. Opers can ban anyone regardless, but they can also still be affected by other bans if they don't have a high enough list mode. This is done to maintain fairness in the channel, but opers may sometimes need to set insane channel bans. Similar to my other mod m_fixhop, this one will simply strip the affected masks and let the IRCd handle further error processing.

Note: Afaik Unreal is unable to "ask" your NickServ flavour about access lists from within a module. So if you have Anope and did /cs access #chan add <nick> 10 it will auto-op that person when they authenticate, but Unreal knows nothing about this list. As such, it simply checks if they have the proper list mode right now.
Protip: use a bouncer such as ZNC

Git repo
If you like my modules, pls consider donating (credit card or iDEAL, use the custom job fee option in my shop) ;];]
Gottem
UnrealIRCd coder
Posts: 192
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

Re: [DONE] Prevent chanops and higher from getting banned

Post by Gottem »

Since alhoceima recommended having a notice for m_fixhop, this module also needed one since they'll both catch masks like *!*@*. =] Looks like this:

Code: Select all

-leaf.mydomain.tld- [BA] Stripped 3 mask(s) (disallowed)
The [BA] prefix indicates it came from bancheck_access. It produces a channel notice but only the offending user will see it, so they won't have to switch to the server console/tab which many people forget to do. Simply slam this in the config somewhere to enable it:

Code: Select all

bancheck_access_notif 1;
Grab the latest code from the git in the OP. ;]
If you like my modules, pls consider donating (credit card or iDEAL, use the custom job fee option in my shop) ;];]
Post Reply