Repository navigation
Add XFLAG Exemption List Channel Mode +X - #273
Open
Jazzzzz-hub wants to merge 1 commit into
Open
Jazzzzz-hub wants to merge 1 commit into
Jazzzzz-hub wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new channel mode
+Xwhich works as a mask-based exemption list for XFLAG restrictions.It works similar to
+eand+I, but instead of exempting from bans or invites, it allows specificnick!user@hostmasks to bypass the existing XFLAG exemption checks.Closes #272.
Usage
Examples:
The mask can match nick, userid, host, IP or a combination of them.
What was added
+XUSER_HOSTMASKINGis_xflags_exempted()SVSMODE -X <nick>cleanupCHANMODESandMAXLISTadvertisementXFLAG_EXEMPT_LISTSI also changed the old
JOIN_CONNECT_TIMErejection label from+XtoJOIN_CONNECT_TIMEbecause+Xis now being used as an actual channel mode.XFLAG behaviour
A matching
+Xmask uses the existingis_xflags_exempted()path.This covers the existing behavioural XFLAG restrictions such as:
Administrative XFLAG settings such as
HIDE_MODE_LISTS,MAX_BANS,MAX_INVITES,SJR, verbose settings andGREETMSGare not changed by this PR.Testing
Tested on isolated Bahamut 2.2.4 servers.
Tested successfully:
+Xadd, remove and list+Xrestores XFLAG enforcement+Xentries across multiple MODE batches+e,+Xand+Itogether during netburstXFLAG_EXEMPT_LISTSenabledXFLAG_EXEMPT_LISTSdisabledgit diff --checkThe masked-host matching code follows the same
USER_HOSTMASKINGapproach already used by the existing channel ban/exempt code.Live B -> A MODE propagation was not separately runtime-tested.
Design choices
For the open questions in #272, this implementation currently uses:
+Xis_xflags_exempted()scope rather than per-XFLAG exemptionsMAXXFLAGEXEMPTLIST = 100355and356XFLAG_EXEMPT_LISTSenabled by defaultNotes
Numerics
355and356were unused in the current Bahamut source, so they are used for the+Xlist and end-of-list replies.Because older servers do not know about the new
+Xchannel mode, the network should be running a compatible version before this mode is used.