mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-25 09:50:39 +01:00
relay: allow overriding tag_nicks per network
Closes #494. (cherry picked from commit 1d6b692e1490e538f5c8d9c16542ff45feab1f9f) Conflicts: example-conf.yml
This commit is contained in:
parent
e8efbb8e83
commit
a639efa93e
@ -168,11 +168,6 @@ servers:
|
|||||||
# PyLink will disconnect with a ping timeout. This defaults to 90 if not set.
|
# PyLink will disconnect with a ping timeout. This defaults to 90 if not set.
|
||||||
#pingfreq: 90
|
#pingfreq: 90
|
||||||
|
|
||||||
# If enabled, this opts this network out of relay IP sharing: this network
|
|
||||||
# will not have its users' IPs sent across the relay, and it will not see any
|
|
||||||
# IPs of other networks' users.
|
|
||||||
#relay_no_ips: true
|
|
||||||
|
|
||||||
# Sets the max nick length for the network. It is important that this is
|
# Sets the max nick length for the network. It is important that this is
|
||||||
# set correctly, or PyLink might introduce a nick that is too long and
|
# set correctly, or PyLink might introduce a nick that is too long and
|
||||||
# cause netsplits! This defaults to 30 if not set.
|
# cause netsplits! This defaults to 30 if not set.
|
||||||
@ -209,6 +204,15 @@ servers:
|
|||||||
# This setting is EXPERIMENTAL as of PyLink 1.2.x.
|
# This setting is EXPERIMENTAL as of PyLink 1.2.x.
|
||||||
#encoding: utf-8
|
#encoding: utf-8
|
||||||
|
|
||||||
|
# If enabled, this opts this network out of relay IP sharing: this network
|
||||||
|
# will not have its users' IPs sent across the relay, and it will not see any
|
||||||
|
# IPs of other networks' users.
|
||||||
|
#relay_no_ips: true
|
||||||
|
|
||||||
|
# Determines whether relay will tag nicks on this network. This overrides the relay::tag_nicks
|
||||||
|
# option on a per network-basis.
|
||||||
|
#relay_tag_nicks: true
|
||||||
|
|
||||||
ts6net:
|
ts6net:
|
||||||
ip: ::1
|
ip: ::1
|
||||||
|
|
||||||
|
@ -100,7 +100,10 @@ def normalize_nick(irc, netname, nick, times_tagged=0, uid=''):
|
|||||||
|
|
||||||
# Figure out whether we tag nicks or not.
|
# Figure out whether we tag nicks or not.
|
||||||
if times_tagged == 0:
|
if times_tagged == 0:
|
||||||
if conf.conf.get('relay', {}).get('tag_nicks', True):
|
# Check the following options in order, before falling back to True:
|
||||||
|
# 1) servers::<netname>::relay_tag_nicks
|
||||||
|
# 2) relay::tag_nicks
|
||||||
|
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 = conf.conf.get('relay', {}).get('forcetag_nicks', [])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user