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

Implemented 005 prefix parsing #46

Closed
wants to merge 2 commits into from
Closed

Conversation

Hello71
Copy link
Contributor

@Hello71 Hello71 commented Oct 27, 2011

No description provided.

@martynsmith
Copy link
Owner

Hi,

I had a read through your patch and it looked a little over-complex.

I re-implemented the 005 message parsing using a regexp (which seemed a little more straight forward) and then I heavily refactored the MODE event processing (because neither your implementation or the existing one worked correctly).

Hopefully it all looks okay to you now :-)

@Hello71
Copy link
Contributor Author

Hello71 commented Oct 29, 2011

Possibly better regexp:

/PREFIX=\(([a-z])\)([!@#$%^&*]*)/

Also, just so I don't have to look this up, the relevant section from Internet-Draft IRC RPL_ISUPPORT Numeric Definition:

The PREFIX parameter specifies a list of channel status flags (the
"modes" section) that clients may have on channels, followed by a
mapping to the equivalent channel status flags ("prefixes"), which
are used in NAMES and WHO replies. There is a one to one mapping
between each mode and prefix.

The order of the modes is from that which gives most privileges on
the channel, to that which gives the least.

[Example: (ab)&* maps the channel mode 'a' to the channel status
flag '&', and channel mode 'b' to the channel status flag '*'.]

[Example: PREFIX=(ohv)@%+ maps channel mode 'o' to status '@', 'h'
to status '%', and 'v' to status +.

The default value for PREFIX is "PREFIX=(ov)@+", which corresponds to
RFC 1459 [5]. It SHOULD NOT be specified if the server provides only
these modes. If a server provides ANY additional status flags, it
MUST also provide (ov)@+ (assuming they are applicable to the
server). The PREFIX parameter may be advertised with a null value
specifier; this indicates that no prefixes are supported by the IRC
server.

Note that PREFIX does NOT specify whether or not the server sends
multiple prefix characters for a user in NAMES replies.

Half-Shot referenced this pull request in matrix-org/node-irc Feb 23, 2019
Fix client.join with a list of channel keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants