Updated to allow all drivers to use vhosts.

This commit is contained in:
Jeremy Fincher 2004-12-07 00:27:26 +00:00
parent 1e49f9e82b
commit ab217fc3fd
2 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,8 @@ class AsyncoreDriver(asynchat.async_chat, drivers.ServersMixin):
try:
server = self._getNextServer()
sock = utils.getSocket(server[0])
vhost = conf.supybot.protocols.irc.vhost()
sock.bind((vhost, 0))
self.set_socket(sock)
drivers.log.connect(self.currentServer)
self.connect(server)

View File

@ -138,6 +138,8 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
drivers.log.connect(self.currentServer)
try:
self.conn = utils.getSocket(server[0])
vhost = conf.supybot.protocols.irc.vhost()
self.conn.bind((vhost, 0))
except socket.error, e:
drivers.log.connectError(self.currentServer, e)
self.reconnect(wait=True)