]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
script plugin: reindent
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 18 Mar 2008 23:20:20 +0000 (00:20 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 19 Mar 2008 13:49:48 +0000 (14:49 +0100)
data/rbot/plugins/script.rb

index 5e2f1e58e1b9140eac4cfabae9a2e17384dfde70..f6d867c53e9ffb80353a140550d996316b17307a 100644 (file)
@@ -70,29 +70,29 @@ class ScriptPlugin < Plugin
 
   def handle_eval( m, params )
     code = params[:code].to_s.dup.untaint
-      Thread.start {
-        # TODO allow different safe levels for different botusers
-        begin
-          eval( code )
-        rescue Exception => e
-          m.reply( "Script '#{name}' crapped out :(" )
-          m.reply( e.inspect )
-        end
-      }
+    Thread.start {
+      # TODO allow different safe levels for different botusers
+      begin
+        eval( code )
+      rescue Exception => e
+        m.reply( "Script '#{name}' crapped out :(" )
+        m.reply( e.inspect )
+      end
+    }
   end
 
 
   def handle_echo( m, params )
     code = params[:code].to_s.dup.untaint
-      Thread.start {
-        # TODO allow different safe levels for different botusers
-        begin
-          m.reply eval( code ).to_s
-        rescue Exception => e
-          m.reply( "Script '#{name}' crapped out :(" )
-          m.reply( e.inspect )
-        end
-      }
+    Thread.start {
+      # TODO allow different safe levels for different botusers
+      begin
+        m.reply eval( code ).to_s
+      rescue Exception => e
+        m.reply( "Script '#{name}' crapped out :(" )
+        m.reply( e.inspect )
+      end
+    }
   end