summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/freshmeat.rb
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-10-13 15:37:44 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-10-13 15:37:44 +0000
commit8b0e2e09f81a7d89ceb52e947e9db12a206a8c37 (patch)
tree9ad17bf9e5597226c3e9db2ec3b95425e30974ab /data/rbot/plugins/freshmeat.rb
parentd5257757e7cbe3067ba3befb8ea98dd9cd3f5c54 (diff)
various outstanding changes
Diffstat (limited to 'data/rbot/plugins/freshmeat.rb')
-rw-r--r--data/rbot/plugins/freshmeat.rb20
1 files changed, 13 insertions, 7 deletions
diff --git a/data/rbot/plugins/freshmeat.rb b/data/rbot/plugins/freshmeat.rb
index 20fa7248..eb2dbdf7 100644
--- a/data/rbot/plugins/freshmeat.rb
+++ b/data/rbot/plugins/freshmeat.rb
@@ -58,16 +58,22 @@ class FreshmeatPlugin < Plugin
def freshmeat(m, params)
max = params[:limit].to_i
max = 8 if max > 8
- xml = @bot.httputil.get(URI.parse("http://images.feedstermedia.com/feedcache/ostg/freshmeat/fm-releases-global.xml"))
- unless xml
- m.reply "freshmeat news parse failed"
- return
- end
- doc = Document.new xml
- unless doc
+ begin
+ xml = @bot.httputil.get(URI.parse("http://images.feedstermedia.com/feedcache/ostg/freshmeat/fm-releases-global.xml"))
+ unless xml
+ m.reply "freshmeat news parse failed"
+ return
+ end
+ doc = Document.new xml
+ unless doc
+ m.reply "freshmeat news parse failed"
+ return
+ end
+ rescue
m.reply "freshmeat news parse failed"
return
end
+
matches = Array.new
max_width = 60
title_width = 0