mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-17 23:52:49 +01:00
parent
75798b5fba
commit
ae87def11f
@ -7,7 +7,6 @@ ban,+b,+b,+b,+b,+b,+b
|
|||||||
banexception,+e (m_banexception),+e,+e,+e,+e,+e
|
banexception,+e (m_banexception),+e,+e,+e,+e,+e
|
||||||
blockcaps,+B (m_blockcaps),,+G (extensions/chm_nocaps.c),,,
|
blockcaps,+B (m_blockcaps),,+G (extensions/chm_nocaps.c),,,
|
||||||
blockcolor,+c (m_blockcolor),,,+c,+c,+c
|
blockcolor,+c (m_blockcolor),,,+c,+c,+c
|
||||||
c_noforwards,,+Q,+Q,,,
|
|
||||||
delayjoin,,,,,,+D
|
delayjoin,,,,,,+D
|
||||||
exemptchanops,+X (m_exemptchanops),,,,,
|
exemptchanops,+X (m_exemptchanops),,,,,
|
||||||
filter,+g (m_filter),,,,,
|
filter,+g (m_filter),,,,,
|
||||||
@ -32,6 +31,7 @@ nickflood,+F (m_nickflood),,,,,
|
|||||||
noamsg,,,,,,+T
|
noamsg,,,,,,+T
|
||||||
noctcp,+C (m_noctcp),+C,+C,+C,+C,+C
|
noctcp,+C (m_noctcp),+C,+C,+C,+C,+C
|
||||||
noextmsg,+n,+n,+n,+n,+n,+n
|
noextmsg,+n,+n,+n,+n,+n,+n
|
||||||
|
noforwards,,+Q,+Q,,,
|
||||||
noinvite,,,,,,
|
noinvite,,,,,,
|
||||||
nokick,+Q (m_nokicks),,+E,+Q,,
|
nokick,+Q (m_nokicks),,+E,+Q,,
|
||||||
noknock,+K (m_knock),+p,,+K,+p,
|
noknock,+K (m_knock),+p,,+K,+p,
|
||||||
|
|
@ -674,9 +674,9 @@ whitelisted_cmodes = {'admin', 'allowinvite', 'autoop', 'ban', 'banexception',
|
|||||||
'regmoderated', 'secret', 'sslonly', 'adminonly',
|
'regmoderated', 'secret', 'sslonly', 'adminonly',
|
||||||
'stripcolor', 'topiclock', 'voice', 'flood',
|
'stripcolor', 'topiclock', 'voice', 'flood',
|
||||||
'flood_unreal', 'joinflood', 'freetarget',
|
'flood_unreal', 'joinflood', 'freetarget',
|
||||||
'c_noforwards', 'noinvite'}
|
'noforwards', 'noinvite'}
|
||||||
whitelisted_umodes = {'bot', 'hidechans', 'hideoper', 'invisible', 'oper',
|
whitelisted_umodes = {'bot', 'hidechans', 'hideoper', 'invisible', 'oper',
|
||||||
'regdeaf', 'u_stripcolor', 'u_noctcp', 'wallops',
|
'regdeaf', 'stripcolor', 'noctcp', 'wallops',
|
||||||
'hideidle'}
|
'hideidle'}
|
||||||
def relayModes(irc, remoteirc, sender, channel, modes=None):
|
def relayModes(irc, remoteirc, sender, channel, modes=None):
|
||||||
"""
|
"""
|
||||||
|
@ -387,6 +387,9 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
|||||||
for modepair in args[-1].split():
|
for modepair in args[-1].split():
|
||||||
name, char = modepair.split('=')
|
name, char = modepair.split('=')
|
||||||
|
|
||||||
|
# Strip c_ prefixes to be consistent with other protocols.
|
||||||
|
name = name.lstrip('c_')
|
||||||
|
|
||||||
if name == 'reginvite': # Reginvite? That's a dumb name.
|
if name == 'reginvite': # Reginvite? That's a dumb name.
|
||||||
name = 'regonly'
|
name = 'regonly'
|
||||||
|
|
||||||
@ -396,10 +399,6 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
|||||||
# but I personally prefer the latter.
|
# but I personally prefer the latter.
|
||||||
name = 'owner'
|
name = 'owner'
|
||||||
|
|
||||||
if name == 'c_registered':
|
|
||||||
# Be consistent with other protocols
|
|
||||||
name = 'registered'
|
|
||||||
|
|
||||||
# We don't care about mode prefixes; just the mode char.
|
# We don't care about mode prefixes; just the mode char.
|
||||||
self.irc.cmodes[name] = char[-1]
|
self.irc.cmodes[name] = char[-1]
|
||||||
|
|
||||||
@ -413,6 +412,8 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
|||||||
# Ditto above.
|
# Ditto above.
|
||||||
for modepair in args[-1].split():
|
for modepair in args[-1].split():
|
||||||
name, char = modepair.split('=')
|
name, char = modepair.split('=')
|
||||||
|
# Strip u_ prefixes to be consistent with other protocols.
|
||||||
|
name = name.lstrip('u_')
|
||||||
self.irc.umodes[name] = char
|
self.irc.umodes[name] = char
|
||||||
|
|
||||||
elif args[0] == 'CAPABILITIES':
|
elif args[0] == 'CAPABILITIES':
|
||||||
|
@ -684,7 +684,7 @@ class P10Protocol(Protocol):
|
|||||||
'snomask': 's', 'servprotect': 'k', 'sno_debug': 'g', 'cloak': 'x',
|
'snomask': 's', 'servprotect': 'k', 'sno_debug': 'g', 'cloak': 'x',
|
||||||
'hidechans': 'n', 'deaf_commonchan': 'q', 'bot': 'B', 'deaf': 'D',
|
'hidechans': 'n', 'deaf_commonchan': 'q', 'bot': 'B', 'deaf': 'D',
|
||||||
'hideoper': 'H', 'hideidle': 'I', 'regdeaf': 'R', 'showwhois': 'W',
|
'hideoper': 'H', 'hideidle': 'I', 'regdeaf': 'R', 'showwhois': 'W',
|
||||||
'admin': 'a', 'override': 'X', 'u_noforward': 'L', 'ssl': 'z',
|
'admin': 'a', 'override': 'X', 'noforward': 'L', 'ssl': 'z',
|
||||||
'registered': 'r', 'cloak_sethost': 'h', 'cloak_fakehost': 'f',
|
'registered': 'r', 'cloak_sethost': 'h', 'cloak_fakehost': 'f',
|
||||||
'cloak_hashedhost': 'C', 'cloak_hashedip': 'c',
|
'cloak_hashedhost': 'C', 'cloak_hashedip': 'c',
|
||||||
'*A': '', '*B': '', '*C': 'fCcrh', '*D': 'oOiwskgxnqBDHIRWaXLz'}
|
'*A': '', '*B': '', '*C': 'fCcrh', '*D': 'oOiwskgxnqBDHIRWaXLz'}
|
||||||
|
@ -263,7 +263,7 @@ class TS6Protocol(TS6BaseProtocol):
|
|||||||
# 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',
|
||||||
'c_noforwards': 'Q', 'stripcolor': 'c', 'allowinvite':
|
'noforwards': 'Q', 'stripcolor': 'c', 'allowinvite':
|
||||||
'g', 'opmoderated': 'z', 'noctcp': 'C',
|
'g', 'opmoderated': 'z', 'noctcp': 'C',
|
||||||
# charybdis-specific modes provided by EXTENSIONS
|
# charybdis-specific modes provided by EXTENSIONS
|
||||||
'operonly': 'O', 'adminonly': 'A', 'sslonly': 'S',
|
'operonly': 'O', 'adminonly': 'A', 'sslonly': 'S',
|
||||||
@ -284,9 +284,9 @@ class TS6Protocol(TS6BaseProtocol):
|
|||||||
self.irc.cmodes = chary_cmodes
|
self.irc.cmodes = chary_cmodes
|
||||||
|
|
||||||
# Define supported user modes
|
# Define supported user modes
|
||||||
chary_umodes = {'deaf': 'D', 'servprotect': 'S', 'u_admin': 'a',
|
chary_umodes = {'deaf': 'D', 'servprotect': 'S', 'admin': 'a',
|
||||||
'invisible': 'i', 'oper': 'o', 'wallops': 'w',
|
'invisible': 'i', 'oper': 'o', 'wallops': 'w',
|
||||||
'snomask': 's', 'u_noforward': 'Q', 'regdeaf': 'R',
|
'snomask': 's', 'noforward': 'Q', 'regdeaf': 'R',
|
||||||
'callerid': 'g', 'operwall': 'z', 'locops': 'l',
|
'callerid': 'g', 'operwall': 'z', 'locops': 'l',
|
||||||
'cloak': 'x',
|
'cloak': 'x',
|
||||||
# Now, map all the ABCD type modes:
|
# Now, map all the ABCD type modes:
|
||||||
@ -304,7 +304,7 @@ class TS6Protocol(TS6BaseProtocol):
|
|||||||
self.irc.cmodes.update(elemental_cmodes)
|
self.irc.cmodes.update(elemental_cmodes)
|
||||||
self.irc.cmodes['*D'] += ''.join(elemental_cmodes.values())
|
self.irc.cmodes['*D'] += ''.join(elemental_cmodes.values())
|
||||||
|
|
||||||
elemental_umodes = {'u_noctcp': 'C', 'deaf': 'D', 'bot': 'B', 'u_noinvite': 'V',
|
elemental_umodes = {'noctcp': 'C', 'deaf': 'D', 'bot': 'B', 'noinvite': 'V',
|
||||||
'hidechans': 'I'}
|
'hidechans': 'I'}
|
||||||
self.irc.umodes.update(elemental_umodes)
|
self.irc.umodes.update(elemental_umodes)
|
||||||
self.irc.umodes['*D'] += ''.join(elemental_umodes.values())
|
self.irc.umodes['*D'] += ''.join(elemental_umodes.values())
|
||||||
|
@ -313,7 +313,7 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
'bot': 'B', 'cloak': 'x', 'ssl': 'z',
|
'bot': 'B', 'cloak': 'x', 'ssl': 'z',
|
||||||
'filter': 'G', 'hideoper': 'H', 'hideidle': 'I',
|
'filter': 'G', 'hideoper': 'H', 'hideidle': 'I',
|
||||||
'regdeaf': 'R', 'servprotect': 'S',
|
'regdeaf': 'R', 'servprotect': 'S',
|
||||||
'u_noctcp': 'T', 'showwhois': 'W',
|
'noctcp': 'T', 'showwhois': 'W',
|
||||||
'*A': '', '*B': '', '*C': '', '*D': 'dipqrstwBxzGHIRSTW'})
|
'*A': '', '*B': '', '*C': '', '*D': 'dipqrstwBxzGHIRSTW'})
|
||||||
|
|
||||||
f = self.irc.send
|
f = self.irc.send
|
||||||
|
Loading…
Reference in New Issue
Block a user