X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fbash.rb;h=8dac9671792b7b1c2e0375a751674464aac799ab;hb=fc0c682cbf7a68b8ccd458ac776770fccf9e59f4;hp=d9515f5ec9cc4603c4085d2e0786102944770d89;hpb=144cbc49e1893162ee415868c22faa1e815f5107;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/bash.rb b/data/rbot/plugins/bash.rb index d9515f5e..8dac9671 100644 --- a/data/rbot/plugins/bash.rb +++ b/data/rbot/plugins/bash.rb @@ -161,7 +161,7 @@ class BashPlugin < Plugin # may want to echo more than one for latest/random quote = quotes.first end - m.reply quote.to_s + m.reply quote.to_s, :split_at => /\s+\|\s+/ end def xml_bash(m, id=nil) @@ -172,7 +172,7 @@ class BashPlugin < Plugin xml = @bot.httputil.get("http://bash.org/xml/?random&num=1", :cache => false) else xml = @bot.httputil.get("http://bash.org/xml/?" + id + "&num=1") - end + end unless xml m.reply "bash.org rss parse failed" @@ -184,7 +184,7 @@ class BashPlugin < Plugin return end doc.elements.each("*/item") {|e| - if(id != 0) + if(id != 0) reply = e.elements["title"].text.gsub(/QDB: /,"") + " " + e.elements["link"].text.gsub(/QDB: /,"") + "\n" reply = reply + e.elements["description"].text.gsub(/\
/, "\n") else