From: Giuseppe Bilotta Date: Sun, 8 Apr 2007 10:26:50 +0000 (+0000) Subject: ircbot: do not use debug in sendmsg() because it breaks script. script plugin: handle... X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=42045b5df29519cb4307ac433c6fd0d4ba5f157b;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git ircbot: do not use debug in sendmsg() because it breaks script. script plugin: handle all Exceptions. --- diff --git a/data/rbot/plugins/script.rb b/data/rbot/plugins/script.rb index 1b695868..29afa20a 100644 --- a/data/rbot/plugins/script.rb +++ b/data/rbot/plugins/script.rb @@ -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 diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 649c02ed..619150fb 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -902,7 +902,6 @@ class Bot else lines = all_lines end - debug lines.inspect lines.each { |line| sendq "#{fixed}#{line}", chan, ring