Trying out vhost stuff.

This commit is contained in:
Jeremy Fincher 2004-10-27 00:17:55 +00:00
parent 625043c4e1
commit a2dfa3bd15
2 changed files with 6 additions and 1 deletions

View File

@ -824,6 +824,10 @@ registerGlobalValue(supybot.protocols.irc, 'umodes',
networks allow +x, which indicates to the auth services on those networks
that you should be given a fake host."""))
registerGlobalValue(supybot.protocols.irc, 'vhost',
registry.String('', """Determines what vhost the bot will bind to before
connecting to the IRC server."""))
registerGlobalValue(supybot.protocols.irc, 'maxHistoryLength',
registry.Integer(1000, """Determines how many old messages the bot will
keep around in its history. Changing this variable will not take effect

View File

@ -109,7 +109,8 @@ class SupyReconnectingFactory(ReconnectingClientFactory, drivers.ServersMixin):
self.irc = irc
drivers.ServersMixin.__init__(self, irc)
(server, port) = self._getNextServer()
reactor.connectTCP(server, port, self)
vhost = conf.supybot.protocols.irc.vhost()
reactor.connectTCP(server, port, self, bindAddress=(vhost, 0))
def clientConnectionFailed(self, connector, r):
drivers.log.connectError(self.currentServer, errorMsg(r))