3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-30 14:49:28 +01:00

relay: allow configuring custom relay server suffixes

Closes #333.
This commit is contained in:
James Lu 2016-09-23 22:49:04 -07:00
parent b467da13b1
commit 3900833458
2 changed files with 8 additions and 1 deletions

View File

@ -477,6 +477,10 @@ relay:
# False.
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.
#server_suffix: "relay.yournet.net"
games:
# Sets the nick of the Games service, if you're using it. This defaults to "games" if not defined.
nick: Games

View File

@ -252,7 +252,10 @@ def spawnRelayServer(irc, remoteirc):
try:
# ENDBURST is delayed by 3 secs on supported IRCds to prevent
# triggering join-flood protection and the like.
sid = irc.proto.spawnServer('%s.relay' % remoteirc.name,
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),
desc="PyLink Relay network - %s" %
(remoteirc.serverdata.get('netname')\
or remoteirc.name), endburst_delay=3)