]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
ircbot: do not use debug in sendmsg() because it breaks script. script plugin: handle...
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 8 Apr 2007 10:26:50 +0000 (10:26 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 8 Apr 2007 10:26:50 +0000 (10:26 +0000)
data/rbot/plugins/script.rb
lib/rbot/ircbot.rb

index 1b69586816c06a53365da5299a8f27ddc796cf07..29afa20a62e183fea66450382ef1a91722b1bd21 100644 (file)
@@ -60,7 +60,7 @@ class ScriptPlugin < Plugin
 
         begin
           eval( code )
-        rescue => e
+        rescue Exception => e
           m.reply( "Script '#{name}' crapped out :(" )
           m.reply( e.inspect )
         end
@@ -75,7 +75,7 @@ class ScriptPlugin < Plugin
         # TODO allow different safe levels for different botusers
         begin
           eval( code )
-        rescue => e
+        rescue Exception => e
           m.reply( "Script '#{name}' crapped out :(" )
           m.reply( e.inspect )
         end
@@ -89,7 +89,7 @@ class ScriptPlugin < Plugin
         # TODO allow different safe levels for different botusers
         begin
           m.reply eval( code ).to_s
-        rescue => e
+        rescue Exception => e
           m.reply( "Script '#{name}' crapped out :(" )
           m.reply( e.inspect )
         end
index 649c02eda8cb23330cb71bc88e750cc6dda508d3..619150fbf6d591552ede4c52af6ba4db28073b8f 100644 (file)
@@ -902,7 +902,6 @@ class Bot
     else
       lines = all_lines
     end
-    debug lines.inspect
 
     lines.each { |line|
       sendq "#{fixed}#{line}", chan, ring