Permalink
Browse files

Going to need to get a session with every joke since the cookie will

expire.
  • Loading branch information...
1 parent 6a8d608 commit c6702e84f8c448ba1183254816465cccf6916603 @wilkie wilkie committed Feb 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/xombot/plugins/joke.rb
@@ -7,7 +7,6 @@ class Joke < XOmBot::Plugin
def initialize *args
@agent = Mechanize.new
- @agent.get "#{JOKE_DOMAIN}/#{JOKE_ACTIONS[:start]}"
super *args
end
@@ -19,6 +18,7 @@ def initialize *args
help "Gives you the answer"
def tell_joke(m)
+ @agent.get "#{JOKE_DOMAIN}/#{JOKE_ACTIONS[:start]}"
@agent.get "#{JOKE_DOMAIN}/#{JOKE_ACTIONS[:new]}"
page = @agent.get "#{JOKE_DOMAIN}/#{JOKE_ACTIONS[:joke]}"

0 comments on commit c6702e8

Please sign in to comment.