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

allow host to be specified in service bot block or per-network

This commit is contained in:
Mitchell Cooper 2017-07-12 18:38:26 -04:00
parent 87fe7693b0
commit 33630e8f9d
2 changed files with 10 additions and 4 deletions

View File

@ -31,8 +31,8 @@ def spawn_service(irc, source, command, args):
nick = irc.serverdata.get("%s_nick" % name) or conf.conf.get(name, {}).get('nick') or sbot.nick or name nick = irc.serverdata.get("%s_nick" % name) or conf.conf.get(name, {}).get('nick') or sbot.nick or name
ident = irc.serverdata.get("%s_ident" % name) or conf.conf.get(name, {}).get('ident') or sbot.ident or name ident = irc.serverdata.get("%s_ident" % name) or conf.conf.get(name, {}).get('ident') or sbot.ident or name
# TODO: make this configurable? # Determine host the same way as above, except fall back to hostname.
host = irc.hostname() host = irc.serverdata.get("%s_host" % name) or conf.conf.get(name, {}).get('host') or irc.hostname()
# Spawning service clients with these umodes where supported. servprotect usage is a # Spawning service clients with these umodes where supported. servprotect usage is a
# configuration option. # configuration option.

View File

@ -274,12 +274,14 @@ servers:
protocol: "unreal" protocol: "unreal"
autoconnect: 5 autoconnect: 5
# You can also define network-specific nicks and idents for various service # You can also define network-specific nicks, idents, and hosts for various service
# bots, using the configuration options "servicename_nick" and "servicename_ident". # bots, using the configuration options "servicename_nick", etc.
#pylink_nick: MagicServ #pylink_nick: MagicServ
#pylink_ident: magicserv #pylink_ident: magicserv
#pylink_host: pylink.mynet.net
#games_nick: MagicGames #games_nick: MagicGames
#games_ident: magicgames #games_ident: magicgames
#games_host: games.mynet.net
nefarious: nefarious:
ip: somenet.ddns.local ip: somenet.ddns.local
@ -719,6 +721,10 @@ games:
# Sets the nick of the Games service, if you're using it. This defaults to "games" if not defined. # Sets the nick of the Games service, if you're using it. This defaults to "games" if not defined.
nick: Games nick: Games
# Ident and host can also be specified here, but they may be overriden per-network.
#ident: games
#host: play.games
# Defines a fantasy prefix for the Games bot. # Defines a fantasy prefix for the Games bot.
prefix: "./" prefix: "./"