mirror of
https://github.com/wr34k/IRCUFC.git
synced 2024-11-24 00:16:39 +00:00
Removed useless variable + log error even without debug var enabled
This commit is contained in:
parent
1bcccfc1d7
commit
3a5fa320b8
@ -24,7 +24,6 @@ username = 'McBuffer'
|
|||||||
realname = '** WE FIGHTIN **'
|
realname = '** WE FIGHTIN **'
|
||||||
|
|
||||||
optkey= "!"
|
optkey= "!"
|
||||||
timeout=0.4
|
|
||||||
|
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
@ -74,12 +73,10 @@ class IrcBot(object):
|
|||||||
self.listen()
|
self.listen()
|
||||||
|
|
||||||
def register(self):
|
def register(self):
|
||||||
self.log.info("Identifying...")
|
|
||||||
self.raw("USER {} 0 * :{}".format(self.user, self.real))
|
self.raw("USER {} 0 * :{}".format(self.user, self.real))
|
||||||
self.raw("NICK {}".format(self.nick))
|
self.raw("NICK {}".format(self.nick))
|
||||||
|
|
||||||
def updateNick(self):
|
def updateNick(self):
|
||||||
self.log.info("Updating NICK to {}".format(self.nick))
|
|
||||||
self.raw("NICK {}".format(self.nick))
|
self.raw("NICK {}".format(self.nick))
|
||||||
|
|
||||||
def listen(self):
|
def listen(self):
|
||||||
@ -115,7 +112,6 @@ class IrcBot(object):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def join(self):
|
def join(self):
|
||||||
self.log.info("Now joining {} ...".format(self.channel))
|
|
||||||
self.raw("JOIN {} {}".format(self.channel, self.chankey)) if self.chankey else self.raw("JOIN {}".format(self.channel))
|
self.raw("JOIN {} {}".format(self.channel, self.chankey)) if self.chankey else self.raw("JOIN {}".format(self.channel))
|
||||||
|
|
||||||
|
|
||||||
|
9
log.py
9
log.py
@ -72,8 +72,7 @@ class Log(object):
|
|||||||
self.func( self.construct( "[", self.colors.fg.LIGHTYELLOW, "!", self.colors.fg.DEFAULT, "] ", msg ) )
|
self.func( self.construct( "[", self.colors.fg.LIGHTYELLOW, "!", self.colors.fg.DEFAULT, "] ", msg ) )
|
||||||
|
|
||||||
def error(self, msg, exception=None):
|
def error(self, msg, exception=None):
|
||||||
if self.debug:
|
self.func( self.construct( "[", self.colors.fg.LIGHTRED, "x", self.colors.fg.DEFAULT, "] ", msg ) )
|
||||||
self.func( self.construct( "[", self.colors.fg.LIGHTRED, "x", self.colors.fg.DEFAULT, "] ", msg ) )
|
if exception:
|
||||||
if exception:
|
self.func( self.construct( "[", self.colors.fg.LIGHTRED, "x", self.colors.fg.DEFAULT, "] ", str(exception) ) )
|
||||||
self.func( self.construct( "[", self.colors.fg.LIGHTRED, "x", self.colors.fg.DEFAULT, "] ", str(exception) ) )
|
traceback.print_tb(exception.__traceback__)
|
||||||
traceback.print_tb(exception.__traceback__)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user