Browse files

a little mo betta on reload...

  • Loading branch information...
1 parent 57bb9ea commit b3c6a0099cf41befb32b761fba747b6242115b53 @ahoward ahoward committed Oct 13, 2011
Showing with 22 additions and 11 deletions.
  1. +1 −1 lib/fbomb.rb
  2. +0 −10 lib/fbomb/commands/builtin.rb
  3. +21 −0 lib/fbomb/commands/system.rb
View
2 lib/fbomb.rb
@@ -10,7 +10,7 @@
# libs
#
module FBomb
- Version = '1.0.0' unless defined?(Version)
+ Version = '1.1.0' unless defined?(Version)
def version
FBomb::Version
View
10 lib/fbomb/commands/builtin.rb
@@ -2,16 +2,6 @@
##
#
- command(:reload){
- help 'reload fbomb commands'
-
- call do |*args|
- FBomb::Command.table = FBomb::Command::Table.new
- FBomb::Command.load(Command.command_paths)
- speak('locked and loaded.')
- end
- }
-
command(:rhymeswith) {
help 'show ryhming words'
View
21 lib/fbomb/commands/system.rb
@@ -15,6 +15,27 @@
end
}
+ command(:reload){
+ help 'reload fbomb commands'
+
+ call do |*args|
+ Thread.critical = true
+ table = FBomb::Command.table
+
+ begin
+ FBomb::Command.table = FBomb::Command::Table.new
+ FBomb::Command.load(Command.command_paths)
+ speak('locked and loaded.')
+ rescue Object => e
+ #msg = "#{ e.message }(#{ e.class })\n#{ Array(e.backtrace).join(10.chr) }"
+ #speak(msg)
+ FBomb::Command.table = table
+ ensure
+ Thread.critical = false
+ end
+ end
+ }
+
command(:fbomb) {
call {
urls = %w(

0 comments on commit b3c6a00

Please sign in to comment.