mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
relay: remove cloak from whitelisted umodes, send modes to spawnClient as a set (prevents duplicates)
This commit is contained in:
parent
b965f2c4b0
commit
adfa114c4b
@ -230,7 +230,7 @@ def getRemoteUser(irc, remoteirc, user, spawnIfMissing=True):
|
|||||||
# Normalize hostnames
|
# Normalize hostnames
|
||||||
host = normalizeHost(remoteirc, userobj.host)
|
host = normalizeHost(remoteirc, userobj.host)
|
||||||
realname = userobj.realname
|
realname = userobj.realname
|
||||||
modes = getSupportedUmodes(irc, remoteirc, userobj.modes)
|
modes = set(getSupportedUmodes(irc, remoteirc, userobj.modes))
|
||||||
opertype = ''
|
opertype = ''
|
||||||
if ('o', None) in userobj.modes:
|
if ('o', None) in userobj.modes:
|
||||||
if hasattr(userobj, 'opertype'):
|
if hasattr(userobj, 'opertype'):
|
||||||
@ -255,7 +255,8 @@ def getRemoteUser(irc, remoteirc, user, spawnIfMissing=True):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
use_hideoper = True
|
use_hideoper = True
|
||||||
if hideoper_mode and use_hideoper:
|
if hideoper_mode and use_hideoper:
|
||||||
modes.append((hideoper_mode, None))
|
modes.add((hideoper_mode, None))
|
||||||
|
|
||||||
rsid = getRemoteSid(remoteirc, irc)
|
rsid = getRemoteSid(remoteirc, irc)
|
||||||
try:
|
try:
|
||||||
showRealIP = irc.conf['relay']['show_ips']
|
showRealIP = irc.conf['relay']['show_ips']
|
||||||
@ -537,7 +538,7 @@ whitelisted_cmodes = {'admin', 'allowinvite', 'autoop', 'ban', 'banexception',
|
|||||||
'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'}
|
'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)
|
||||||
|
Loading…
Reference in New Issue
Block a user