diff --git a/example-conf.yml b/example-conf.yml index 56c3601..78b2e7e 100644 --- a/example-conf.yml +++ b/example-conf.yml @@ -173,11 +173,6 @@ servers: # PyLink will disconnect with a ping timeout. This defaults to 90 if not set. #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 # set correctly, or PyLink might introduce a nick that is too long and # cause netsplits! This defaults to 30 if not set. @@ -214,6 +209,15 @@ servers: # This setting is EXPERIMENTAL as of PyLink 1.2.x. #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 + # InspIRCd specific option: determines whether we should display WHOIS extensions by overriding # InspIRCd's default WHOIS formatting. This defaults to true for consistency with PyLink 1.x. #force_whois_extensions: true diff --git a/plugins/relay.py b/plugins/relay.py index 377e039..ee77650 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -101,7 +101,10 @@ def normalize_nick(irc, netname, nick, times_tagged=0, uid=''): # Figure out whether we tag nicks or not. 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::::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 else: forcetag_nicks = conf.conf.get('relay', {}).get('forcetag_nicks', [])