summaryrefslogtreecommitdiff
path: root/rbot/utils.rb
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-03-10 12:11:17 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-03-10 12:11:17 +0000
commit787c3322e0c1acdccb457c47bea76f31c5747f52 (patch)
tree6dc7e8e1bb39907208c441994127e4d6e63da03c /rbot/utils.rb
parentbebe7f8392f3f1750bc196cb19bd4bfbda3310b6 (diff)
fix http usage, other tweaks
Diffstat (limited to 'rbot/utils.rb')
-rw-r--r--rbot/utils.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/rbot/utils.rb b/rbot/utils.rb
index 516fb4dc..36276e8d 100644
--- a/rbot/utils.rb
+++ b/rbot/utils.rb
@@ -166,18 +166,18 @@ module Irc
http.open_timeout = opentimeout
http.read_timeout = readtimeout
- http.start {|http|
- begin
+ begin
+ http.start {|http|
resp = http.get(query)
if resp.code == "200"
return resp.body
end
- rescue => e
- # cheesy for now
- $stderr.puts "Utils.http_get exception: #{e}, while trying to get #{uristr}"
- return nil
- end
- }
+ }
+ rescue => e
+ # cheesy for now
+ $stderr.puts "Utils.http_get exception: #{e}, while trying to get #{uristr}"
+ return nil
+ end
end
# This is nasty-ass. I hate writing parsers.