public
Description: An extensible bot for the Campfire web-based chat system #crc
Homepage:
Clone URL: git://github.com/timriley/campfire-bot.git
add SSL support
timriley (author)
Mon Nov 17 00:51:16 -0800 2008
commit  5bb5022bbfdc2ca4686c7e8d969c0870bc8a4df5
tree    0a028a2aea7d10292a726b9ee0b86c228f579996
parent  1b6de4d3325e4502c73a44d33eada21f1791d6c6
0
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
0
@@ -1,3 +1,26 @@
0
+- get it to work with the newest version of mechanize.
0
+
0
+/opt/local/lib/ruby/gems/1.8/gems/timriley-tinder-1.1.9/lib/tinder/mechanize_ext.rb:6: undefined method `set_headers' for class `WWW::Mechanize' (NameError)
0
+  from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
0
+  from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require'
0
+  from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
0
+  from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:355:in `new_constants_in'
0
+  from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
0
+  from /opt/local/lib/ruby/gems/1.8/gems/timriley-tinder-1.1.9/lib/tinder.rb:10
0
+  from /opt/local/lib/ruby/gems/1.8/gems/timriley-tinder-1.1.9/lib/tinder.rb:10:in `each'
0
+  from /opt/local/lib/ruby/gems/1.8/gems/timriley-tinder-1.1.9/lib/tinder.rb:10
0
+  from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
0
+  from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:32:in `require'
0
+  from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
0
+  from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:355:in `new_constants_in'
0
+  from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
0
+  from ./script/../lib/bot.rb:13
0
+  from ./script/bot:7:in `require'
0
+  from ./script/bot:7
0
+
0
+
0
+- need flood control for bot plugins
0
+
0
 - need to catch timeout errors and do something sensible, like wait and retry the connection
0
 
0
 - need to catch no-network errors and return a sensible error message:
...
1
2
 
3
4
5
...
8
9
10
 
11
12
13
...
1
2
3
4
5
6
...
9
10
11
12
13
14
15
0
@@ -1,5 +1,6 @@
0
 development:
0
   site: campfire_subdomain_name 
0
+  use_ssl: true
0
   room: Test
0
   username: foo@bar.com
0
   nickname: Bot Name
0
@@ -8,6 +9,7 @@ development:
0
   twitter_hide_replies: false
0
 production:
0
   site: campfire_subdomain_name
0
+  use_ssl: true
0
   room: Company Chat
0
   username: foo@bar.com
0
   nickname: Bot Name
...
27
28
29
30
 
31
32
33
...
27
28
29
 
30
31
32
33
0
@@ -27,7 +27,7 @@ module CampfireBot
0
     def connect
0
       load_plugins
0
     
0
-      @campfire = Tinder::Campfire.new(@config['site'])
0
+      @campfire = Tinder::Campfire.new(@config['site'], :ssl => !!@config['use_ssl'])
0
       @campfire.login(@config['username'], @config['password'])
0
       @room = @campfire.find_room_by_name(@config['room'])
0
       @room.join

Comments