From 40f41a9e0bb5b4575592cd88fe48c38b6a92b81c Mon Sep 17 00:00:00 2001 From: "Jimmy@Jimmy-HP" Date: Mon, 2 Apr 2012 16:14:13 -0500 Subject: [PATCH] fix a crashing bug when doing !help ping --- modules/common.py | 1 + modules/wolfgame.py | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/common.py b/modules/common.py index 7e276f4..2df47ea 100644 --- a/modules/common.py +++ b/modules/common.py @@ -2,6 +2,7 @@ import botconfig from tools import decorators import logging import tools.moduleloader as ld +import traceback def on_privmsg(cli, rawnick, chan, msg): diff --git a/modules/wolfgame.py b/modules/wolfgame.py index e83b971..97c912a 100644 --- a/modules/wolfgame.py +++ b/modules/wolfgame.py @@ -1883,7 +1883,7 @@ def mass_privmsg(cli, targets, msg): def relay(cli, nick, rest): """Let the wolves talk to each other through the bot""" if var.PHASE not in ("night", "day"): - return + return badguys = var.ROLES["wolf"] + var.ROLES["traitor"] + var.ROLES["werecrow"] if len(badguys) > 1: @@ -2348,12 +2348,14 @@ def get_help(cli, rnick, rest): found = True for fn in c[cname]: if fn.__doc__: - if nick == botconfig.CHANNEL: - var.LOGGER.logMessage(botconfig.CMD_CHAR+cname+": "+fn.__doc__(rest)) if callable(fn.__doc__): cli.msg(nick, botconfig.CMD_CHAR+cname+": "+fn.__doc__(rest)) + if nick == botconfig.CHANNEL: + var.LOGGER.logMessage(botconfig.CMD_CHAR+cname+": "+fn.__doc__(rest)) else: cli.msg(nick, botconfig.CMD_CHAR+cname+": "+fn.__doc__) + if nick == botconfig.CHANNEL: + var.LOGGER.logMessage(botconfig.CMD_CHAR+cname+": "+fn.__doc__) return else: continue