3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-11 20:49:33 +01:00

hybrid, ts6, ratbox: fix +p mode definitions properly

+p is noknock and rfc1459-style private on all 3 IRCds, though the latter bit is undocumented in /help cmodes (maybe it's assumed?)
+p is also "paranoia" on hybrid, which adds more restrictions to halfops and /invite

(cherry picked from commit c107f0062f)
This commit is contained in:
James Lu 2017-08-11 13:45:40 -07:00
parent 32130a7988
commit a03214514c
4 changed files with 8 additions and 4 deletions

View File

@ -44,8 +44,9 @@ oplevel_apass,,,,,,,A,,A,A,
oplevel_upass,,,,,,,U,,U,U, oplevel_upass,,,,,,,U,,U,U,
opmoderated,,U (extras/m_opmoderated),z,z,,,,,,, opmoderated,,U (extras/m_opmoderated),z,z,,,,,,,
owner,,q (m_customprefix/m_chanprotect),,y (when enabled),q,,,,,, owner,,q (m_customprefix/m_chanprotect),,y (when enabled),q,,,,,,
paranoia,,,,,,p,,,,,
permanent,,P (m_permchannels),P,P,P,,z,,,,P permanent,,P (m_permchannels),P,P,P,,z,,,,P
private,p,p,,,p,,p,p,p,p,p private,p,p,,,p,,p,,p,p,p
quiet,,,q,q,,,,,,, quiet,,,q,q,,,,,,,
redirect,,L (m_redirect),f,f,L,,L,,,, redirect,,L (m_redirect),f,f,L,,L,,,,
registered,,r (m_services_account),,,r,r,R,,R,R,r registered,,r (m_services_account),,,r,r,R,,R,R,r

1 Channel Mode / IRCd RFC1459 InspIRCd charybdis Elemental-IRCd UnrealIRCd IRCd-Hybrid Nefarious IRCu ircd-ratbox snircd IRCu ngIRCd
44 oplevel_upass U U U
45 opmoderated U (extras/m_opmoderated) z z
46 owner q (m_customprefix/m_chanprotect) y (when enabled) q
47 paranoia p
48 permanent P (m_permchannels) P P P z P
49 private p p p p p p p p
50 quiet q q
51 redirect L (m_redirect) f f L L
52 registered r (m_services_account) r r R R R r

View File

@ -23,16 +23,18 @@ class HybridProtocol(TS6Protocol):
f = self.irc.send f = self.irc.send
# https://github.com/grawity/irc-docs/blob/master/server/ts6.txt#L80 # https://github.com/grawity/irc-docs/blob/master/server/ts6.txt#L80
# Note: according to hybrid source code, +p is paranoia, noknock,
# AND rfc1459-style private, though the last isn't documented.
cmodes = { cmodes = {
# TS6 generic modes: # TS6 generic modes:
'op': 'o', 'halfop': 'h', 'voice': 'v', 'ban': 'b', 'key': 'k', 'op': 'o', 'halfop': 'h', 'voice': 'v', 'ban': 'b', 'key': 'k',
'limit': 'l', 'moderated': 'm', 'noextmsg': 'n', 'limit': 'l', 'moderated': 'm', 'noextmsg': 'n',
'secret': 's', 'topiclock': 't', 'secret': 's', 'topiclock': 't', 'private': 'p',
# hybrid-specific modes: # hybrid-specific modes:
'blockcolor': 'c', 'inviteonly': 'i', 'noctcp': 'C', 'blockcolor': 'c', 'inviteonly': 'i', 'noctcp': 'C',
'regmoderated': 'M', 'operonly': 'O', 'regonly': 'R', 'regmoderated': 'M', 'operonly': 'O', 'regonly': 'R',
'sslonly': 'S', 'banexception': 'e', 'noknock': 'p', 'sslonly': 'S', 'banexception': 'e', 'noknock': 'p',
'registered': 'r', 'invex': 'I', 'registered': 'r', 'invex': 'I', 'paranoia': 'p',
# Now, map all the ABCD type modes: # Now, map all the ABCD type modes:
'*A': 'beI', '*B': 'k', '*C': 'l', '*D': 'cimnprstCMORS' '*A': 'beI', '*B': 'k', '*C': 'l', '*D': 'cimnprstCMORS'
} }

View File

@ -22,7 +22,7 @@ class RatboxProtocol(TS6Protocol):
# Note: +r, +e, and +I support will be negotiated on link # Note: +r, +e, and +I support will be negotiated on link
self.irc.cmodes = {'op': 'o', 'secret': 's', 'private': 'p', 'noextmsg': 'n', 'moderated': 'm', self.irc.cmodes = {'op': 'o', 'secret': 's', 'private': 'p', 'noextmsg': 'n', 'moderated': 'm',
'inviteonly': 'i', 'topiclock': 't', 'limit': 'l', 'ban': 'b', 'voice': 'v', 'inviteonly': 'i', 'topiclock': 't', 'limit': 'l', 'ban': 'b', 'voice': 'v',
'key': 'k', 'sslonly': 'S', 'key': 'k', 'sslonly': 'S', 'noknock': 'p',
'*A': 'beI', '*A': 'beI',
'*B': 'k', '*B': 'k',
'*C': 'l', '*C': 'l',

View File

@ -267,6 +267,7 @@ class TS6Protocol(TS6BaseProtocol):
'op': 'o', 'voice': 'v', 'ban': 'b', 'key': 'k', 'limit': 'op': 'o', 'voice': 'v', 'ban': 'b', 'key': 'k', 'limit':
'l', 'moderated': 'm', 'noextmsg': 'n', 'noknock': 'p', 'l', 'moderated': 'm', 'noextmsg': 'n', 'noknock': 'p',
'secret': 's', 'topiclock': 't', 'inviteonly': 'i', 'secret': 's', 'topiclock': 't', 'inviteonly': 'i',
'private': 'p',
# charybdis-specific modes: # charybdis-specific modes:
'quiet': 'q', 'redirect': 'f', 'freetarget': 'F', 'quiet': 'q', 'redirect': 'f', 'freetarget': 'F',
'joinflood': 'j', 'largebanlist': 'L', 'permanent': 'P', 'joinflood': 'j', 'largebanlist': 'L', 'permanent': 'P',