# 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)
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"
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(/\<br \/\>/, "\n")
else