diff --git a/dice/ircplugin.py b/dice/ircplugin.py index 0f9fa2d..51b57bf 100644 --- a/dice/ircplugin.py +++ b/dice/ircplugin.py @@ -54,8 +54,8 @@ class Dice(Plugin): choices_list = choices.split(' ') choice = random.choice(choices_list) - logger.debug(event._recursing) - if event._recursing: + logger.debug(event.recursing) + if event.recursing: reply = "{0:s}".format(choice) else: reply = "{0:s}: {1:s}".format(nick, choice) @@ -67,8 +67,8 @@ class Dice(Plugin): nick = NickMask(event.source).nick dicestr = match.group(1) - logger.debug(event._recursing) - if event._recursing: + logger.debug(event.recursing) + if event.recursing: reply = "{0:s}".format(self.roller.do_roll(dicestr)) else: reply = "{0:s}: {1:s}".format(nick, self.roller.do_roll(dicestr)) diff --git a/ircbot/bot.py b/ircbot/bot.py index 4c3f225..2c63602 100644 --- a/ircbot/bot.py +++ b/ircbot/bot.py @@ -149,7 +149,7 @@ class DrReactor(irc.client.Reactor): event.target, event.arguments) # set up some default stuff - event._recursing = False + event.recursing = False event.addressed = False event.original_msg = None event.addressed_msg = None @@ -255,7 +255,7 @@ class DrReactor(irc.client.Reactor): # copy the event and see if IT has recursion to do newevent = copy.deepcopy(event) newevent.arguments[0] = subcmd - newevent._recursing = True + newevent.recursing = True log.debug("new event copied") @@ -899,7 +899,7 @@ class IRCBot(irc.client.SimpleIRCClient): if event: log.debug("in reply for e[%s] r[%s]", event, replystr) replypath = ircbotlib.reply_destination_for_event(event) - recursing = getattr(event, '_recursing', False) + recursing = getattr(event, 'recursing', False) log.debug("determined recursing to be %s", recursing) elif explicit_target: log.debug("in reply for e[NO EVENT] r[%s]", replystr) diff --git a/markov/ircplugin.py b/markov/ircplugin.py index 732767f..19cdd31 100644 --- a/markov/ircplugin.py +++ b/markov/ircplugin.py @@ -78,7 +78,7 @@ class Markov(Plugin): log.debug("not learning from %s as i've been told to ignore it", channel) else: # learn the line - recursing = getattr(event, '_recursing', False) + recursing = getattr(event, 'recursing', False) if not recursing: log.debug("learning %s", trimmed_what) context = markovlib.get_or_create_target_context(target)