mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 04:32:36 +01:00
Debugging messages commented out
This commit is contained in:
parent
b0daafe00e
commit
332c2cb2d4
14
src/bot.py
14
src/bot.py
@ -74,12 +74,15 @@ def processConfigFile(filename):
|
|||||||
debug.recoverableError('%s: %s' % (filename, msg))
|
debug.recoverableError('%s: %s' % (filename, msg))
|
||||||
class ConfigAfter376(irclib.IrcCallback):
|
class ConfigAfter376(irclib.IrcCallback):
|
||||||
public = False
|
public = False
|
||||||
def __init__(self, msgs):
|
def __init__(self, commands):
|
||||||
self.msgs = msgs
|
self.commands = commands
|
||||||
|
|
||||||
def do376(self, irc, msg):
|
def do376(self, irc, msg):
|
||||||
#debug.printf('Firing ConfigAfter376 messages')
|
#debug.printf('Firing ConfigAfter376 messages')
|
||||||
for msg in self.msgs:
|
for command in self.commands:
|
||||||
|
#debug.printf(irc.nick)
|
||||||
|
#debug.printf(command)
|
||||||
|
msg = ircmsgs.privmsg(irc.nick, command)
|
||||||
irc.queueMsg(msg)
|
irc.queueMsg(msg)
|
||||||
|
|
||||||
do377 = do376
|
do377 = do376
|
||||||
@ -120,8 +123,6 @@ def processConfigFile(filename):
|
|||||||
else:
|
else:
|
||||||
text = newtext
|
text = newtext
|
||||||
lines = text.splitlines()
|
lines = text.splitlines()
|
||||||
print lines
|
|
||||||
print tuple(itersplit(lines, lambda s: not s, True))
|
|
||||||
(startup, after376) = tuple(itersplit(lines,lambda s: not s, True))
|
(startup, after376) = tuple(itersplit(lines,lambda s: not s, True))
|
||||||
#debug.printf('startup: %r' % startup)
|
#debug.printf('startup: %r' % startup)
|
||||||
#debug.printf('after376: %r' % after376)
|
#debug.printf('after376: %r' % after376)
|
||||||
@ -130,8 +131,7 @@ def processConfigFile(filename):
|
|||||||
irc.feedMsg(ircmsgs.privmsg(irc.nick, line))
|
irc.feedMsg(ircmsgs.privmsg(irc.nick, line))
|
||||||
irc.reset()
|
irc.reset()
|
||||||
world.startup = False
|
world.startup = False
|
||||||
msgs = [ircmsgs.privmsg(irc.nick, line) for line in after376]
|
irc.addCallback(ConfigAfter376(after376))
|
||||||
irc.addCallback(ConfigAfter376(msgs))
|
|
||||||
driver = asyncoreDrivers.AsyncoreDriver(server)
|
driver = asyncoreDrivers.AsyncoreDriver(server)
|
||||||
driver.irc = irc
|
driver.irc = irc
|
||||||
except IOError, e:
|
except IOError, e:
|
||||||
|
Loading…
Reference in New Issue
Block a user