]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/script.rb
script plugin: reindent
[user/henk/code/ruby/rbot.git] / 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