mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-25 12:19:24 +01:00
drivers: Log SOCKS proxy on connecting
This commit is contained in:
parent
c3f39fc93b
commit
cca1156b90
@ -278,7 +278,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
|
||||
drivers.log.connectError(self.currentServer, e)
|
||||
self.scheduleReconnect()
|
||||
return
|
||||
drivers.log.connect(self.currentServer)
|
||||
drivers.log.connect(self.currentServer, socks_proxy=socks_proxy)
|
||||
try:
|
||||
self.conn = utils.net.getSocket(
|
||||
address,
|
||||
|
@ -173,9 +173,14 @@ def run():
|
||||
|
||||
class Log(object):
|
||||
"""This is used to have a nice, consistent interface for drivers to use."""
|
||||
def connect(self, server):
|
||||
self.info('Connecting to %s:%s.',
|
||||
server.hostname, server.port)
|
||||
def connect(self, server, socks_proxy=None):
|
||||
if socks_proxy:
|
||||
socks_phrase = ' Via SOCKS proxy %s'
|
||||
else:
|
||||
socks_phrase = ''
|
||||
socks_proxy = ''
|
||||
self.info('Connecting to %s:%s.' + socks_phrase,
|
||||
server.hostname, server.port, socks_proxy)
|
||||
|
||||
def connectError(self, server, e):
|
||||
if isinstance(e, Exception):
|
||||
|
Loading…
Reference in New Issue
Block a user