X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fnote.rb;h=e0a7be293a05a192375e4aed7e03cebe72ad347c;hb=b955d424d89655a04ba5f06d3cfee482ae33e713;hp=25d122a13b56a71e2abeb02c6c1e232f43f7fcd1;hpb=cbdb5bd2eae2d30805e7228bce8d9ad70f7e4a9e;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/note.rb b/data/rbot/plugins/note.rb index 25d122a1..e0a7be29 100644 --- a/data/rbot/plugins/note.rb +++ b/data/rbot/plugins/note.rb @@ -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 @@ -44,11 +44,11 @@ class NotePlugin < Plugin pub = [] priv = [] @registry[nick].each do |n| - s = "[#{n.time.strftime('%H:%M')}] <#{n.from}> #{n.text}" - unless n.private or @bot.config['note.private_message'] - pub << s - else + s = "[#{n.time.strftime('%b-%e %H:%M')}] <#{n.from}> #{n.text}" + if n.private or @bot.config['note.private_message'] priv << s + else + pub << s end end unless pub.empty?