mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-09 02:54:14 +01:00
relay: allow defining server-specific nicks to always tags
Closes #564.
This commit is contained in:
parent
56fa626605
commit
60c05af9ed
@ -216,6 +216,10 @@ servers:
|
|||||||
# IPs of other networks' users.
|
# IPs of other networks' users.
|
||||||
#relay_no_ips: true
|
#relay_no_ips: true
|
||||||
|
|
||||||
|
# If relay nick tagging is disabled, this option specifies a per-network list of nick
|
||||||
|
# globs to always tag when introducing users *from* other networks.
|
||||||
|
#relay_forcetag_nicks: ["someuser", "Guest*"]
|
||||||
|
|
||||||
# Sets the suffix that relay subservers on this network should use.
|
# Sets the suffix that relay subservers on this network should use.
|
||||||
# If not specified per network, falls back to the value at
|
# If not specified per network, falls back to the value at
|
||||||
# relay:server_suffix or "relay" if that is not set.
|
# relay:server_suffix or "relay" if that is not set.
|
||||||
|
@ -108,7 +108,8 @@ def normalize_nick(irc, netname, nick, times_tagged=0, uid=''):
|
|||||||
if irc.serverdata.get('relay_tag_nicks', conf.conf.get('relay', {}).get('tag_nicks', True)):
|
if irc.serverdata.get('relay_tag_nicks', conf.conf.get('relay', {}).get('tag_nicks', True)):
|
||||||
times_tagged = 1
|
times_tagged = 1
|
||||||
else:
|
else:
|
||||||
forcetag_nicks = conf.conf.get('relay', {}).get('forcetag_nicks', [])
|
forcetag_nicks = set(conf.conf.get('relay', {}).get('forcetag_nicks', []))
|
||||||
|
forcetag_nicks |= set(irc.serverdata.get('relay_forcetag_nicks', []))
|
||||||
log.debug('(%s) relay.normalize_nick: checking if globs %s match %s.', irc.name, forcetag_nicks, nick)
|
log.debug('(%s) relay.normalize_nick: checking if globs %s match %s.', irc.name, forcetag_nicks, nick)
|
||||||
for glob in forcetag_nicks:
|
for glob in forcetag_nicks:
|
||||||
if irc.match_host(glob, nick):
|
if irc.match_host(glob, nick):
|
||||||
|
Loading…
Reference in New Issue
Block a user