code: function cmd(handlers)
  {
    this.fieldindex = 0;
    this.state = "start";
    this.stmt = ""
    this.params = []
  
    // mixin all handlers
    for (var h in handlers)
    {
      this[h] = handlers[h];
    }
    // save command name to display in debug output
    this.command_name = cmd.caller.command_name;
    this.args = Array.prototype.slice.call(cmd.caller.arguments);
  }
docs: base for all commands initialises EventEmitter and implemets state mashine