mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +01:00
main: better INFO logging...
This commit is contained in:
parent
a77427ded9
commit
024cf9d878
3
main.py
3
main.py
@ -84,7 +84,9 @@ class Irc():
|
|||||||
self.socket.settimeout(self.pingtimeout)
|
self.socket.settimeout(self.pingtimeout)
|
||||||
self.proto.connect(self)
|
self.proto.connect(self)
|
||||||
self.spawnMain()
|
self.spawnMain()
|
||||||
|
log.info('(%s) Starting ping schedulers....', self.name)
|
||||||
self.schedulePing()
|
self.schedulePing()
|
||||||
|
log.info('(%s) Server ready; listening for data.', self.name)
|
||||||
self.run()
|
self.run()
|
||||||
except (socket.error, classes.ProtocolError, ConnectionError) as e:
|
except (socket.error, classes.ProtocolError, ConnectionError) as e:
|
||||||
log.warning('(%s) Disconnected from IRC: %s: %s',
|
log.warning('(%s) Disconnected from IRC: %s: %s',
|
||||||
@ -183,6 +185,7 @@ class Irc():
|
|||||||
nick = self.botdata.get('nick') or 'PyLink'
|
nick = self.botdata.get('nick') or 'PyLink'
|
||||||
ident = self.botdata.get('ident') or 'pylink'
|
ident = self.botdata.get('ident') or 'pylink'
|
||||||
host = self.serverdata["hostname"]
|
host = self.serverdata["hostname"]
|
||||||
|
log.info('(%s) Connected! Spawning main client %s.', self.name, nick)
|
||||||
self.pseudoclient = self.proto.spawnClient(self, nick, ident, host, modes={("+o", None)})
|
self.pseudoclient = self.proto.spawnClient(self, nick, ident, host, modes={("+o", None)})
|
||||||
for chan in self.serverdata['channels']:
|
for chan in self.serverdata['channels']:
|
||||||
self.proto.joinClient(self, self.pseudoclient.uid, chan)
|
self.proto.joinClient(self, self.pseudoclient.uid, chan)
|
||||||
|
Loading…
Reference in New Issue
Block a user