mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-14 22:49:23 +01:00
Add per-network 'vhost' and 'vhostv6' config variables
This commit is contained in:
parent
4898926f20
commit
5b2b38ab37
@ -419,6 +419,15 @@ def registerNetwork(name, password='', ssl=True, sasl_username='',
|
||||
registry.String('', _("""Determines what user modes the bot will request
|
||||
from the server when it first connects. If empty, defaults to
|
||||
supybot.protocols.irc.umodes""")))
|
||||
registerGlobalValue(network, 'vhost',
|
||||
registry.String('', _("""Determines what vhost the bot will bind to before
|
||||
connecting a server (IRC, HTTP, ...) via IPv4. If empty, defaults to
|
||||
supybot.protocols.irc.vhost""")))
|
||||
registerGlobalValue(network, 'vhostv6',
|
||||
registry.String('', _("""Determines what vhost the bot will bind to before
|
||||
connecting a server (IRC, HTTP, ...) via IPv6. If empty, defaults to
|
||||
supybot.protocols.irc.vhostv6""")))
|
||||
|
||||
sasl = registerGroup(network, 'sasl')
|
||||
registerGlobalValue(sasl, 'username', registry.String(sasl_username,
|
||||
_("""Determines what SASL username will be used on %s. This should
|
||||
|
@ -312,8 +312,10 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
||||
address,
|
||||
port=self.currentServer.port,
|
||||
socks_proxy=socks_proxy,
|
||||
vhost=conf.supybot.protocols.irc.vhost(),
|
||||
vhostv6=conf.supybot.protocols.irc.vhostv6(),
|
||||
vhost=self.networkGroup.get('vhost')()
|
||||
or conf.supybot.protocols.irc.vhost(),
|
||||
vhostv6=self.networkGroup.get('vhostv6')()
|
||||
or conf.supybot.protocols.irc.vhostv6(),
|
||||
)
|
||||
except socket.error as e:
|
||||
drivers.log.connectError(self.currentServer, e)
|
||||
|
Loading…
Reference in New Issue
Block a user