mirror of
https://github.com/progval/Limnoria.git
synced 2025-04-28 05:51:16 -05: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
|
registry.String('', _("""Determines what user modes the bot will request
|
||||||
from the server when it first connects. If empty, defaults to
|
from the server when it first connects. If empty, defaults to
|
||||||
supybot.protocols.irc.umodes""")))
|
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')
|
sasl = registerGroup(network, 'sasl')
|
||||||
registerGlobalValue(sasl, 'username', registry.String(sasl_username,
|
registerGlobalValue(sasl, 'username', registry.String(sasl_username,
|
||||||
_("""Determines what SASL username will be used on %s. This should
|
_("""Determines what SASL username will be used on %s. This should
|
||||||
|
@ -312,8 +312,10 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
|||||||
address,
|
address,
|
||||||
port=self.currentServer.port,
|
port=self.currentServer.port,
|
||||||
socks_proxy=socks_proxy,
|
socks_proxy=socks_proxy,
|
||||||
vhost=conf.supybot.protocols.irc.vhost(),
|
vhost=self.networkGroup.get('vhost')()
|
||||||
vhostv6=conf.supybot.protocols.irc.vhostv6(),
|
or conf.supybot.protocols.irc.vhost(),
|
||||||
|
vhostv6=self.networkGroup.get('vhostv6')()
|
||||||
|
or conf.supybot.protocols.irc.vhostv6(),
|
||||||
)
|
)
|
||||||
except socket.error as e:
|
except socket.error as e:
|
||||||
drivers.log.connectError(self.currentServer, e)
|
drivers.log.connectError(self.currentServer, e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user