mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
unreal/ts6/relay: add some more user mode support
Cloaking is still a bit iffy on UnrealIRCd networks - Unreal insists on applying its own cloaking for +x users, but vHosts for non +x remote users don't apply at all (their real host is shown instead)
This commit is contained in:
parent
a3e0159054
commit
5c0517ba40
@ -536,7 +536,8 @@ whitelisted_cmodes = {'admin', 'allowinvite', 'autoop', 'ban', 'banexception',
|
|||||||
'regmoderated', 'secret', 'sslonly', 'adminonly',
|
'regmoderated', 'secret', 'sslonly', 'adminonly',
|
||||||
'stripcolor', 'topiclock', 'voice'}
|
'stripcolor', 'topiclock', 'voice'}
|
||||||
whitelisted_umodes = {'bot', 'hidechans', 'hideoper', 'invisible', 'oper',
|
whitelisted_umodes = {'bot', 'hidechans', 'hideoper', 'invisible', 'oper',
|
||||||
'regdeaf', 'u_stripcolor', 'u_noctcp', 'wallops'}
|
'regdeaf', 'u_stripcolor', 'u_noctcp', 'wallops',
|
||||||
|
'cloak', 'hideidle'}
|
||||||
def relayModes(irc, remoteirc, sender, channel, modes=None):
|
def relayModes(irc, remoteirc, sender, channel, modes=None):
|
||||||
remotechan = getRemoteChan(irc, remoteirc, channel)
|
remotechan = getRemoteChan(irc, remoteirc, channel)
|
||||||
log.debug('(%s) Relay mode: remotechan for %s on %s is %s', irc.name, channel, irc.name, remotechan)
|
log.debug('(%s) Relay mode: remotechan for %s on %s is %s', irc.name, channel, irc.name, remotechan)
|
||||||
|
@ -289,7 +289,7 @@ class TS6Protocol(TS6BaseProtocol):
|
|||||||
'invisible': 'i', 'oper': 'o', 'wallops': 'w',
|
'invisible': 'i', 'oper': 'o', 'wallops': 'w',
|
||||||
'snomask': 's', 'u_noforward': 'Q', 'regdeaf': 'R',
|
'snomask': 's', 'u_noforward': 'Q', 'regdeaf': 'R',
|
||||||
'callerid': 'g', 'chary_operwall': 'z', 'chary_locops':
|
'callerid': 'g', 'chary_operwall': 'z', 'chary_locops':
|
||||||
'l',
|
'l', 'cloak': 'x',
|
||||||
# Now, map all the ABCD type modes:
|
# Now, map all the ABCD type modes:
|
||||||
'*A': '', '*B': '', '*C': '', '*D': 'DSaiowsQRgzl'}
|
'*A': '', '*B': '', '*C': '', '*D': 'DSaiowsQRgzl'}
|
||||||
self.irc.umodes.update(chary_umodes)
|
self.irc.umodes.update(chary_umodes)
|
||||||
|
@ -36,6 +36,7 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
'C': 'noctcp', 'O': 'operonly', 'S': 'stripcolor',
|
'C': 'noctcp', 'O': 'operonly', 'S': 'stripcolor',
|
||||||
'm': 'moderated', 'K': 'noknock', 'o': 'op', 'v': 'voice',
|
'm': 'moderated', 'K': 'noknock', 'o': 'op', 'v': 'voice',
|
||||||
'I': 'invex', 't': 'topiclock', 'f': 'flood_unreal'}
|
'I': 'invex', 't': 'topiclock', 'f': 'flood_unreal'}
|
||||||
|
|
||||||
self._neededCaps = ["VL", "SID", "CHANMODES", "NOQUIT", "SJ3"]
|
self._neededCaps = ["VL", "SID", "CHANMODES", "NOQUIT", "SJ3"]
|
||||||
|
|
||||||
# Some command aliases
|
# Some command aliases
|
||||||
@ -243,7 +244,15 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
"""Initializes a connection to a server."""
|
"""Initializes a connection to a server."""
|
||||||
ts = self.irc.start_ts
|
ts = self.irc.start_ts
|
||||||
self.irc.prefixmodes = {'q': '~', 'a': '&', 'o': '@', 'h': '%', 'v': '+'}
|
self.irc.prefixmodes = {'q': '~', 'a': '&', 'o': '@', 'h': '%', 'v': '+'}
|
||||||
### XXX: fill out self.irc.umodes
|
|
||||||
|
self.irc.umodes.update({'deaf': 'd', 'invisible': 'i', 'hidechans': 'p',
|
||||||
|
'protected': 'q', 'registered': 'r',
|
||||||
|
'snomask': 's', 'vhost': 't', 'wallops': 'w',
|
||||||
|
'bot': 'B', 'cloak': 'x', 'ssl': 'z',
|
||||||
|
'filter': 'G', 'hideoper': 'H', 'hideidle': 'I',
|
||||||
|
'regdeaf': 'R', 'servprotect': 'S',
|
||||||
|
'u_noctcp': 'T', 'showwhois': 'W',
|
||||||
|
'*A': '', '*B': '', '*C': '', '*D': 'dipqrstwBxzGHIRSTW'})
|
||||||
|
|
||||||
f = self.irc.send
|
f = self.irc.send
|
||||||
host = self.irc.serverdata["hostname"]
|
host = self.irc.serverdata["hostname"]
|
||||||
@ -262,6 +271,7 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
f('SERVER %s 1 U%s-h6e-%s :%s' % (host, self.proto_ver, self.irc.sid, sdesc))
|
f('SERVER %s 1 U%s-h6e-%s :%s' % (host, self.proto_ver, self.irc.sid, sdesc))
|
||||||
f('NETINFO 1 %s %s * 0 0 0 :%s' % (self.irc.start_ts, self.proto_ver, self.irc.serverdata.get("netname", self.irc.name)))
|
f('NETINFO 1 %s %s * 0 0 0 :%s' % (self.irc.start_ts, self.proto_ver, self.irc.serverdata.get("netname", self.irc.name)))
|
||||||
self._send(self.irc.sid, 'EOS')
|
self._send(self.irc.sid, 'EOS')
|
||||||
|
|
||||||
self.irc.connected.set()
|
self.irc.connected.set()
|
||||||
|
|
||||||
def handle_uid(self, numeric, command, args):
|
def handle_uid(self, numeric, command, args):
|
||||||
|
Loading…
Reference in New Issue
Block a user