summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-02-15 00:40:05 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-02-15 00:40:05 +0100
commit82e5e233ddb878a22a056439dc2f5b40ddf7312e (patch)
treed5f6bd0ed7984d2c92eaf477d110072d93817fa2 /data
parent6597d0ddca268bada27cb5d7750a3fcce89dd658 (diff)
bash plugin: check if the html is actually there
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/bash.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/data/rbot/plugins/bash.rb b/data/rbot/plugins/bash.rb
index 0524204a..6c12ce5e 100644
--- a/data/rbot/plugins/bash.rb
+++ b/data/rbot/plugins/bash.rb
@@ -98,6 +98,11 @@ class BashPlugin < Plugin
end
end
+ if not html
+ m.reply "unable to retrieve quotes"
+ return
+ end
+
html_quotes = html.split(/<p class="quote">/)
html_quotes.each { |htqt|
# debug htqt.inspect