mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 17:29:21 +01:00
relay: allow defining server-specific nicks to always tags
Closes #564.
(cherry picked from commit 60c05af9ed
)
Conflicts:
example-conf.yml
This commit is contained in:
parent
3e16469b25
commit
95f806dc46
@ -220,6 +220,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*"]
|
||||||
|
|
||||||
# Determines whether relay will tag nicks on this network. This overrides the relay::tag_nicks
|
# Determines whether relay will tag nicks on this network. This overrides the relay::tag_nicks
|
||||||
# option on a per network-basis.
|
# option on a per network-basis.
|
||||||
#relay_tag_nicks: true
|
#relay_tag_nicks: true
|
||||||
|
@ -106,7 +106,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.matchHost(glob, nick):
|
if irc.matchHost(glob, nick):
|
||||||
|
Loading…
Reference in New Issue
Block a user