Add SH and ROOTSH commands
[fonbot.git] / src / ro / ieval / fonbot / Utils.java
index be7923ba5694d7c1eb169c0eb649fc9cfad8f4cc..e2e0dab2319ed86e085e98c52c91972ca8a8bcf7 100644 (file)
@@ -68,7 +68,7 @@ public final class Utils {
                LS, RM, CONTACTS, DISABLE, ENABLE,
                POLL, HANGUP, ANSWER, LAUNCH, DATA,
                GPS, GLOCATION, REBOOT, NOTIFY, SCREENCAP,
-               TORCH, GETFILE
+               TORCH, GETFILE, SH, ROOTSH
        }
 
        /**
@@ -1009,6 +1009,24 @@ public final class Utils {
                        }
                        Heavy.getfile(context, replyTo, toNonNull(args[0]), toNonNull(args[1]), getfilePort);
                        break;
+
+               case SH:
+                       if(args.length == 0){
+                               Heavy.help(context, replyTo, toNonNull(Command.SH));
+                               return;
+                       }
+
+                       Heavy.execute(context, replyTo, "sh", join(" ", args));
+                       break;
+
+               case ROOTSH:
+                       if(args.length == 0){
+                               Heavy.help(context, replyTo, toNonNull(Command.ROOTSH));
+                               return;
+                       }
+
+                       Heavy.execute(context, replyTo, "su", join(" ", args));
+                       break;
                }
 
        }
This page took 0.010518 seconds and 4 git commands to generate.