summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-03-16 15:16:20 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-03-16 15:16:20 +0100
commit2f623ce5c2748ae0a6d7628fc2cd06625a644c21 (patch)
tree0997c7e13d749a8810129736b9985eaf319b6613
parente1e90efaf2e9d9d09046e8877c276cb209c5e614 (diff)
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.
-rw-r--r--data/rbot/plugins/seen.rb5
1 files changed, 4 insertions, 1 deletions
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