variable tweak to match other plugins (nick -> who)
This commit is contained in:
parent
363ec49097
commit
0bfe3f9549
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue