Browse Source

bugfix!

tags/v0.1^2
Ben Kurtovic 13 years ago
parent
commit
3fa5d0a178
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      bot/frontend.py

+ 4
- 2
bot/frontend.py View File

@@ -54,7 +54,9 @@ def main():
lines = read_buffer.split("\n") lines = read_buffer.split("\n")
read_buffer = lines.pop() read_buffer = lines.pop()
for line in lines: for line in lines:
_process_message(line)
ret = _process_message(line)
if ret:
return


def _process_message(line): def _process_message(line):
"""Process a single message from IRC.""" """Process a single message from IRC."""
@@ -89,7 +91,7 @@ def _process_message(line):
if data.msg in ["!restart", ".restart"]: if data.msg in ["!restart", ".restart"]:
if data.host in config.irc["permissions"]["owners"]: if data.host in config.irc["permissions"]["owners"]:
print "Restarting bot per owner request..." print "Restarting bot per owner request..."
return
return True


# If we are pinged, pong back: # If we are pinged, pong back:
elif line[0] == "PING": elif line[0] == "PING":


Loading…
Cancel
Save