diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2006-01-21 21:22:41 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2006-01-21 21:22:41 +0000 |
commit | 119892c09183cf09ef5247664ec3d9daa7b7a042 (patch) | |
tree | 1f43472413abc351bddb4d6e7a4bc624c33e2e07 /lib/rbot/plugins.rb | |
parent | ddbe1833c44cc67a2a70d6548960a25b80166633 (diff) |
bunch of changes.
Another of Chris' plugins. A contributed russian.lang from ruskie (honest,
that's his nick!). Some tweaks to error handling. Some modified user/auth
handling (from DevRandom) still a bit more to do on that tho..
Diffstat (limited to 'lib/rbot/plugins.rb')
-rw-r--r-- | lib/rbot/plugins.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/rbot/plugins.rb b/lib/rbot/plugins.rb index 893bb414..f45e44f4 100644 --- a/lib/rbot/plugins.rb +++ b/lib/rbot/plugins.rb @@ -200,7 +200,8 @@ module Plugins debug "loading plugin #{tmpfilename}" plugin_module.module_eval(plugin_string) processed << file - rescue TimeoutError, StandardError, NameError, LoadError, SyntaxError => err + rescue Exception => err + # rescue TimeoutError, StandardError, NameError, LoadError, SyntaxError => err puts "warning: plugin #{tmpfilename} load failed: " + err puts err.backtrace.join("\n") end @@ -250,7 +251,8 @@ module Plugins if(@@plugins.has_key?(key)) begin return @@plugins[key].help(key, params) - rescue TimeoutError, StandardError, NameError, SyntaxError => err + rescue Exception => err + #rescue TimeoutError, StandardError, NameError, SyntaxError => err puts "plugin #{@@plugins[key].name} help() failed: " + err puts err.backtrace.join("\n") end @@ -267,7 +269,8 @@ module Plugins if(p.respond_to? method) begin p.send method, *args - rescue TimeoutError, StandardError, NameError, SyntaxError => err + rescue Exception => err + #rescue TimeoutError, StandardError, NameError, SyntaxError => err puts "plugin #{p.name} #{method}() failed: " + err puts err.backtrace.join("\n") end @@ -284,7 +287,8 @@ module Plugins @@bot.auth.allow?(m.plugin, m.source, m.replyto)) begin @@plugins[m.plugin].privmsg(m) - rescue TimeoutError, StandardError, NameError, SyntaxError => err + rescue Exception => err + #rescue TimeoutError, StandardError, NameError, SyntaxError => err puts "plugin #{@@plugins[m.plugin].name} privmsg() failed: " + err puts err.backtrace.join("\n") end |