Skip to content

Commit

Permalink
seen: Don't show message or channel unless in that channel
Browse files Browse the repository at this point in the history
I think this is good enough to close sopel-irc#189
  • Loading branch information
embolalia committed Jan 26, 2015
1 parent c11f5ef commit 081bee7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion seen.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ def seen(bot, trigger):
timestamp = format_time(bot.db, bot.config, tz, trigger.nick,
trigger.sender, saw)

msg = "I last saw %s at %s on %s, saying %s" % (nick, timestamp, channel, message)
msg = "I last saw {} at {}".format(nick, timestamp)
if Identifier(channel) == trigger.sender:
msg = msg + " in here, saying " + message
else:
msg += " in another channel."
bot.say(str(trigger.nick) + ': ' + msg)
else:
bot.say("Sorry, I haven't seen %s around." % nick)
Expand Down

0 comments on commit 081bee7

Please sign in to comment.