]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/seen.rb
nickserv: add 'ghosted' to nickserv.nick_avail
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / seen.rb
index 8889d26bd1cf8c8ec451327c32cf56d4650cc2a5..0fc6f0760f4dfcc91e8ac622f3e5f0fac3764c5c 100644 (file)
@@ -81,20 +81,22 @@ class SeenPlugin < Plugin
       reg.last
     end
 
-    before = reg.first
+    if reg.kind_of? Array
+      before = reg.first
+    end
 
     formats = {
       :normal      => _("%{nick} was last seen %{when}, %{doing}"),
       :with_before => _("%{nick} was last seen %{when}, %{doing} and %{time} before %{did_before}")
     }
 
-    if [:PART, :QUIT].include?(saw.type.to_sym) &&
+    if before && [:PART, :QUIT].include?(saw.type.to_sym) &&
        [:PUBLIC, :ACTION].include?(before.type.to_sym)
       did_before = case before.type.to_sym
       when :PUBLIC
         _("saying \"%{message}\"")
       when :ACTION
-        _("doing *%{message}*")
+        _("doing *%{nick} %{message}*")
       end % {
         :nick => saw.nick,
         :message => before.message