From 0bfe3f9549123e10527e8c87f2911722e2379dd0 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Sat, 18 Feb 2023 18:44:42 -0600 Subject: [PATCH] variable tweak to match other plugins (nick -> who) --- markov/ircplugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/markov/ircplugin.py b/markov/ircplugin.py index c1ecc0f..0784f60 100644 --- a/markov/ircplugin.py +++ b/markov/ircplugin.py @@ -60,10 +60,10 @@ class Markov(Plugin): def handle_chatter(self, connection, event): """Learn from IRC chatter.""" what = event.arguments[0] - nick = irc.client.NickMask(event.source).nick + who = irc.client.NickMask(event.source).nick target = reply_destination_for_event(event) - log.debug("what: '%s', nick: '%s', target: '%s'", what, nick, target) + log.debug("what: '%s', who: '%s', target: '%s'", what, who, target) # check to see whether or not we should learn from this channel channel = None if irc.client.is_channel(target): @@ -97,7 +97,7 @@ class Markov(Plugin): topics = [x for x in match.group('addressed_msg').split(' ') if len(x) >= 3] return self.bot.reply(event, "{0:s}: {1:s}" - "".format(nick, " ".join(markovlib.generate_line(context, topics=topics)))) + "".format(who, " ".join(markovlib.generate_line(context, topics=topics)))) else: # i wasn't addressed directly, so just respond topics = [x for x in what.split(' ') if len(x) >= 3]