forked from joshwand/campfire-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
72 lines (48 loc) · 3.75 KB
/
TODO
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
- add chronic integration for interval-based events: at_time("every day at 9am", :method_name)
- per-plugin config files (inside a config-specific dir) - best not to pollute a single YAML file.
- get it to work with the newest version of mechanize.
/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)
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:355:in `new_constants_in'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
from /opt/local/lib/ruby/gems/1.8/gems/timriley-tinder-1.1.9/lib/tinder.rb:10
from /opt/local/lib/ruby/gems/1.8/gems/timriley-tinder-1.1.9/lib/tinder.rb:10:in `each'
from /opt/local/lib/ruby/gems/1.8/gems/timriley-tinder-1.1.9/lib/tinder.rb:10
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:32:in `require'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:355:in `new_constants_in'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in `require'
from ./script/../lib/bot.rb:13
from ./script/bot:7:in `require'
from ./script/bot:7
- need flood control for bot plugins
- plugins need callbacks, like on_join, bot_loaded, etc. Especially one that is run whenever control+c is caught (for plugins to clean up)
- gem-ify the bot and have it provide an executable to generate an application directory
like rails
- move the plugins into their own repository and provide a way for them to be installed
into the app dir above (like script/plugin install)
- use a message handler chain in the same way that activesupport uses callback chains.
- provide a way for plugins to buffer themselves, so they don't run too many times
- buffer the "speak" calls so that they can be uniq'ed before printed to the channel?
- plugins should be able to register respond_to blocks with a notion of priority.
eg. a low-priority command can say it doesn't need to be processed if something else matches.
conversely, a high-priority command can cause to bot to stop processing the message once it has matched.
- create a plugin that pulls in unfuddle ticket reports, eg. !unfuddle project_name active_tickets
- modify the austin powers plugin to be a generic imdb quote puller. eg. !imdb austin_powers
- unit tests!
- help plugin-- extend plugin class to provide help for each registered command
- room.log method, can be called from plugins - store logs in ./log/*.log
DONE
- multi-room support
- need to catch timeout errors and do something sensible, like wait and retry the connection
http://www.google.com/search?q=ruby%20rescue%20Timeout::Error
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/136555
http://jerith.livejournal.com/40063.html
http://rails.lighthouseapp.com/projects/8994/tickets/6-patch-activeresource-connection-should-rescue-from-timeout-error
- alternative addressing syntax (!command)
- need to catch no-network errors and return a sensible error message:
/opt/local/lib/ruby/1.8/net/http.rb:560:in `initialize': Network is unreachable - connect(2) (Errno::ENETUNREACH)
- plugin: svn commit notification (multiple repos)