]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/seen.rb
exception handling
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / seen.rb
index 6bd86a7094a4dc03311a389e8fdf91cf744b50f7..aec5a064fa8ebbd7c990119a71ad87a17ccbecb9 100644 (file)
@@ -21,9 +21,10 @@ class SeenPlugin < Plugin
   end
 
   def listen(m)
+    return if m.sourcenick.nil?
     # keep database up to date with who last said what
     if m.kind_of?(PrivMessage)
-      return if m.private? || m.address?
+      return if m.private?
       if m.action?
         @registry[m.sourcenick] = Saw.new(m.sourcenick.dup, Time.new, "ACTION", 
                                           m.target, m.message.dup)
@@ -78,7 +79,7 @@ class SeenPlugin < Plugin
     when "JOIN"
       ret += "joining #{saw.where}"
     when "QUIT"
-      ret += "quiting IRC (#{saw.message})"
+      ret += "quitting IRC (#{saw.message})"
     when "TOPIC"
       ret += "changing the topic of #{saw.where} to #{saw.message}"
     end