Permalink
Browse files

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

  • Loading branch information...
cooper authored and jlu5 committed Jul 12, 2017
1 parent 1eb2743 commit c92bb1e33b8787d4b2f34be8e56900d94fe6f497
Showing with 9 additions and 3 deletions.
  1. +7 −2 example-conf.yml
  2. +2 −1 plugins/relay.py
View
@@ -126,7 +126,12 @@ servers:
# Hostname we will use to connect to the remote server
hostname: "pylink.yournet.local"
# 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"
# SID - required for TS6 and TS6-like servers. This must be three characters:
# the first char must be a digit [0-9], and the remaining two chars may
# be either uppercase letters [A-Z] or digits.
@@ -631,7 +636,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
@@ -218,7 +218,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.spawn_server('%s.%s' % (remoteirc.name, suffix),

0 comments on commit c92bb1e

Please sign in to comment.