X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fquotes.rb;h=a18f1ebac5b2d645f72ed57fa0c060af980f34f8;hb=783ffa4235330029d661752b1023db635b26f2b3;hp=2a6467896fe3cb54775906ff8b156d09fb3291ea;hpb=ff452ad1bf111025f0661274ac7fb8b2f769a293;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/quotes.rb b/data/rbot/plugins/quotes.rb index 2a646789..a18f1eba 100644 --- a/data/rbot/plugins/quotes.rb +++ b/data/rbot/plugins/quotes.rb @@ -37,7 +37,7 @@ class QuotePlugin < Plugin if @changed[channel] debug "Writing new quotefile for channel #{channel} ..." Utils.safe_save(datafile channel) {|file| - quotes.compact.each {|q| + quotes.compact.each {|q| file.puts "#{q.num} | #{q.date} | #{q.source} | #{q.quote}" } } @@ -65,7 +65,7 @@ class QuotePlugin < Plugin def addquote(source, channel, quote) @lists[channel] = Array.new if(!@lists.has_key?(channel)) - num = @lists[channel].length + num = @lists[channel].length @lists[channel][num] = Quote.new(num, Time.new, source.fullform, quote) @changed[channel] = true return num