 -+   commands->append(c);
 - }
 - 
--+void RUNSCRIPT::get_command(const char* command, char *acmd_type, char **cmd)
+-+/* command = ( SHELL_CMD | CONSOLE_CMD ) command */
+-+void RUNSCRIPT::get_command(const char* command, int *acmd_type, char **cmd)
 -+{
--+   *acmd_type = command[0];
+-+   *acmd_type = (int) command[0];
 -+   *cmd = (char *)command + 1;
 -+}
 -+
 - /* set this->target to client_name */
 - void RUNSCRIPT::set_target(const POOLMEM *client_name)
 - {
--@@ -210,14 +186,71 @@
+-@@ -210,14 +185,70 @@
 - 
 - bool RUNSCRIPT::run(JCR *jcr, const char *name)
 - {

-    dst->set_target(src->target);
- 
-    return dst;   
-@@ -95,9 +106,12 @@
- void free_runscript(RUNSCRIPT *script)
- {
-    Dmsg0(500, "runscript: freeing RUNSCRIPT object\n");

-          }
-          /* TODO : we have to play with other client */
-          /*
-@@ -567,7 +572,7 @@
-            send command to an other client
-            }
-          */
