+ time = _("just now")
+ else
+ time = _("%{time} ago") % { :time => Utils.secs_to_string(ago) }
+ end
+
+ doing = case saw.type.to_sym
+ when :PUBLIC
+ _("saying \"%{message}\"")
+ when :ACTION
+ _("doing *%{message}*")
+ when :NICK
+ _("changing nick from %{nick} to %{message}")
+ when :PART
+ if saw.message.empty?
+ _("leaving %{where}")
+ else
+ _("leaving %{where} (%{message})")
+ end
+ when :JOIN
+ _("joining %{where}")
+ when :QUIT
+ _("quitting IRC (%{message})")
+ when :TOPIC
+ _("changing the topic of %{where} to \"%{message}\"")
+ end % { :message => saw.message, :where => saw.where, :nick => saw.nick }
+
+ case format
+ when :normal
+ formats[:normal] % {
+ :nick => saw.nick,
+ :when => time,
+ :doing => doing,
+ }
+ when :with_before
+ formats[:with_before] % {
+ :nick => saw.nick,
+ :when => time,
+ :doing => doing,
+ :time => time_before,
+ :did_before => did_before
+ }
+ end
+ end
+
+ def store(m, saw)
+ reg = @registry[saw.nick]
+
+ if reg && reg.is_a?(Array)
+ reg.shift if reg.size > 1
+ reg.push(saw)