From 2f623ce5c2748ae0a6d7628fc2cd06625a644c21 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 16 Mar 2010 15:16:20 +0100 Subject: seen: use corret 'where' in 'before' case For the 'before' part of the reply, make sure we use the where from the correct Saw. Otherwise, for example, a public message preceeding a quit would show a dangling 'in ' at the end of the reply. --- data/rbot/plugins/seen.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'data/rbot') diff --git a/data/rbot/plugins/seen.rb b/data/rbot/plugins/seen.rb index 4c9fa94e..84a2486e 100644 --- a/data/rbot/plugins/seen.rb +++ b/data/rbot/plugins/seen.rb @@ -125,6 +125,9 @@ class SeenPlugin < Plugin if before && [:PART, :QUIT].include?(saw.type.to_sym) && [:PUBLIC, :ACTION].include?(before.type.to_sym) + # TODO see chan_privacy + prev_chan_privacy = false + prev_where = prev_chan_privacy ? _(CHANPRIV_CHAN) : before.where did_before = case before.type.to_sym when :PUBLIC _(msg_privacy ? MSGPRIV_MSG_PUBLIC : MSG_PUBLIC) @@ -133,7 +136,7 @@ class SeenPlugin < Plugin end % { :nick => saw.nick, :message => before.message, - :where => where + :where => prev_where } format = :with_before -- cgit v1.2.3