mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-17 14:01:03 +01:00
parent
7d0cd1d454
commit
fa1ce45bf3
@ -283,7 +283,7 @@ plugins:
|
|||||||
# to a template string, as they connect. This requires the changehost: block
|
# to a template string, as they connect. This requires the changehost: block
|
||||||
# to be configured correctly below.
|
# to be configured correctly below.
|
||||||
#- changehost
|
#- changehost
|
||||||
|
|
||||||
# Automode plugin: allows assigning channel access to specific hostmasks or
|
# Automode plugin: allows assigning channel access to specific hostmasks or
|
||||||
# exttargets. See https://github.com/GLolol/PyLink/blob/master/docs/automode.md
|
# exttargets. See https://github.com/GLolol/PyLink/blob/master/docs/automode.md
|
||||||
# for a usage guide.
|
# for a usage guide.
|
||||||
@ -413,6 +413,11 @@ relay:
|
|||||||
# experimental.
|
# experimental.
|
||||||
tag_nicks: true
|
tag_nicks: true
|
||||||
|
|
||||||
|
# If tag_nicks is False, this specifies a list of NICK globs that network
|
||||||
|
# tags should be added for anyways (e.g. for network services).
|
||||||
|
forcetag_nicks:
|
||||||
|
- "*Serv"
|
||||||
|
|
||||||
games:
|
games:
|
||||||
# Sets the nick of the Games service, if you're using it.
|
# Sets the nick of the Games service, if you're using it.
|
||||||
nick: Games
|
nick: Games
|
||||||
|
@ -101,9 +101,18 @@ def normalizeNick(irc, netname, nick, times_tagged=0, uid=''):
|
|||||||
separator = irc.serverdata.get('separator') or \
|
separator = irc.serverdata.get('separator') or \
|
||||||
conf.conf.get('relay', {}).get('separator') or "/"
|
conf.conf.get('relay', {}).get('separator') or "/"
|
||||||
|
|
||||||
# Figure out whether we tag nicks by default or not.
|
# Figure out whether we tag nicks or not.
|
||||||
if times_tagged == 0 and conf.conf.get('relay', {}).get('tag_nicks', True):
|
if times_tagged == 0:
|
||||||
times_tagged = 1
|
if conf.conf.get('relay', {}).get('tag_nicks', True):
|
||||||
|
times_tagged = 1
|
||||||
|
else:
|
||||||
|
forcetag_nicks = conf.conf.get('relay', {}).get('forcetag_nicks', [])
|
||||||
|
log.debug('(%s) relay.normalizeNick: checking if globs %s match %s.', irc.name, forcetag_nicks, nick)
|
||||||
|
for glob in forcetag_nicks:
|
||||||
|
if irc.matchHost(glob, nick):
|
||||||
|
# User matched a nick to force tag nicks for. Tag them.
|
||||||
|
times_tagged = 1
|
||||||
|
break
|
||||||
|
|
||||||
log.debug('(%s) relay.normalizeNick: using %r as separator.', irc.name, separator)
|
log.debug('(%s) relay.normalizeNick: using %r as separator.', irc.name, separator)
|
||||||
orig_nick = nick
|
orig_nick = nick
|
||||||
|
Loading…
x
Reference in New Issue
Block a user