hedgewars/uCommands.pas
changeset 4555 85150dfb5959
parent 4414 cb90b7f82cd5
child 4650 0167cbb6aee3
equal deleted inserted replaced
4554:8afc607457b0 4555:85150dfb5959
    54     t: PVariable;
    54     t: PVariable;
    55     c: char;
    55     c: char;
    56 begin
    56 begin
    57 //WriteLnToConsole(CmdStr);
    57 //WriteLnToConsole(CmdStr);
    58 if CmdStr[0]=#0 then exit;
    58 if CmdStr[0]=#0 then exit;
    59 {$IFDEF DEBUGFILE}AddFileLog('ParseCommand "' + CmdStr + '"');{$ENDIF}
       
    60 c:= CmdStr[1];
    59 c:= CmdStr[1];
    61 if c in ['/', '$'] then Delete(CmdStr, 1, 1) else c:= '/';
    60 if c in ['/', '$'] then Delete(CmdStr, 1, 1) else c:= '/';
    62 s:= '';
    61 s:= '';
    63 SplitBySpace(CmdStr, s);
    62 SplitBySpace(CmdStr, s);
       
    63 {$IFDEF DEBUGFILE}AddFileLog('[Cmd] ' + c + CmdStr + ' (' + inttostr(length(CmdStr)) + ')');{$ENDIF}
    64 t:= Variables;
    64 t:= Variables;
    65 while t <> nil do
    65 while t <> nil do
    66       begin
    66       begin
    67       if t^.Name = CmdStr then
    67       if t^.Name = CmdStr then
    68          begin
    68          begin