3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 09:19:23 +01:00

relay: add server-specific server_suffix (closes #462) (#484)

(cherry picked from commit c92bb1e33b)

Conflicts:
	example-conf.yml
This commit is contained in:
Mitchell Cooper 2017-07-12 17:10:36 -04:00 committed by James Lu
parent ac4296b56b
commit 8200d92d23
2 changed files with 8 additions and 2 deletions

View File

@ -224,6 +224,11 @@ servers:
# option on a per network-basis.
#relay_tag_nicks: true
# Sets the suffix that relay subservers that this network should use.
# If not specified per network, falls back to the value at
# relay:server_suffix or "relay" if that is not set.
#server_suffix: "relay.yournet.net"
unrealnet:
ip: ::1
port: 8067
@ -652,7 +657,7 @@ relay:
allow_clientbot_pms: false
# Sets the suffix that relay subservers should use. Defaults to "relay" (as in net1.relay,
# net2.relay, etc.) if not specified.
# net2.relay, etc.) if not specified. This can also be set per-network.
#server_suffix: "relay.yournet.net"
# Sets whether Clientbot mode sync will be enabled. Valid options:

View File

@ -220,7 +220,8 @@ def spawn_relay_server(irc, remoteirc):
try:
# ENDBURST is delayed by 3 secs on supported IRCds to prevent
# triggering join-flood protection and the like.
suffix = conf.conf.get('relay', {}).get('server_suffix', 'relay')
suffix = irc.serverdata.get('server_suffix', conf.conf.get('relay', {}).get('server_suffix', 'relay'))
# Strip any leading or trailing .'s
suffix = suffix.strip('.')
sid = irc.proto.spawnServer('%s.%s' % (remoteirc.name, suffix),