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))
|
||||||
|
|
||||||
|
|
||||||
|
1
log.py
1
log.py
@ -72,7 +72,6 @@ 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) ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user