diff -r 13d6cce2056c -r bf7433e62b9c hedgewars/uCommands.pas --- a/hedgewars/uCommands.pas Mon Apr 23 19:22:43 2012 +0200 +++ b/hedgewars/uCommands.pas Mon Apr 23 19:23:28 2012 +0200 @@ -29,6 +29,7 @@ procedure freeModule; procedure RegisterVariable(Name: shortstring; p: TCommandHandler; Trusted: boolean); procedure ParseCommand(CmdStr: shortstring; TrustedSource: boolean); +procedure ParseTeamCommand(s: shortstring); procedure StopMessages(Message: Longword); implementation @@ -99,6 +100,18 @@ WriteLnToConsole(errmsgUnknownCommand + ': "/' + CmdStr + '"') end end; +procedure ParseTeamCommand(s: shortstring); +var Trusted: boolean; +begin +Trusted:= (CurrentTeam <> nil) + and (not CurrentTeam^.ExtDriven) + and (CurrentHedgehog^.BotLevel = 0); +ParseCommand(s, Trusted); +if (CurrentTeam <> nil) and (not CurrentTeam^.ExtDriven) and (ReadyTimeLeft > 1) then + ParseCommand('gencmd R', true) +end; + + procedure StopMessages(Message: Longword); begin