]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/note.rb
plugin(imdb): changed base url
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / note.rb
index 8dfae36148f3f642e10b938f2d8ab6f6203ee038..e0a7be293a05a192375e4aed7e03cebe72ad347c 100644 (file)
@@ -21,7 +21,7 @@ class NotePlugin < Plugin
     return if @registry.length < 1
     debug 'Checking registry for old-formatted notes...'
     n = 0
-    @registry.dup.each_key do |key|
+    @registry.keys.each do |key|
       unless key == key.downcase
         @registry[key.downcase] = @registry[key] + (@registry[key.downcase] || [])
         @registry.delete key
@@ -45,10 +45,10 @@ class NotePlugin < Plugin
       priv = []
       @registry[nick].each do |n|
         s = "[#{n.time.strftime('%b-%e %H:%M')}] <#{n.from}> #{n.text}"
-        unless n.private or @bot.config['note.private_message']
-          pub << s
-        else
+        if n.private or @bot.config['note.private_message']
           priv << s
+        else
+          pub << s
         end
       end
       unless pub.empty?