hedgewars/uChat.pas
changeset 10392 5012e1f9e893
parent 10376 e8c933a00f97
child 10396 77ff1db6d6e4
equal deleted inserted replaced
10391:ce3ccc45d790 10392:5012e1f9e893
   260 begin
   260 begin
   261 SendIPC('h' + s);
   261 SendIPC('h' + s);
   262 ParseCommand('/hogsay '+s, true)
   262 ParseCommand('/hogsay '+s, true)
   263 end;
   263 end;
   264 
   264 
       
   265 procedure SendConsoleCommand(s: shortstring);
       
   266 begin
       
   267     Delete(s, 1, 1);
       
   268     SendIPC('~' + s)
       
   269 end;
       
   270 
   265 procedure AcceptChatString(s: shortstring);
   271 procedure AcceptChatString(s: shortstring);
   266 var i: TWave;
   272 var i: TWave;
   267     j: TChatCmd;
   273     j: TChatCmd;
   268     c, t: LongInt;
   274     c, t: LongInt;
   269     x: byte;
   275     x: byte;
   381             if (s = ChatCommandz[j].ChatCmd) then
   387             if (s = ChatCommandz[j].ChatCmd) then
   382                 begin
   388                 begin
   383                 ParseCommand(ChatCommandz[j].ProcedureCallChatCmd, true);
   389                 ParseCommand(ChatCommandz[j].ProcedureCallChatCmd, true);
   384                 exit
   390                 exit
   385                 end;
   391                 end;
   386         end
   392         end;
       
   393 
       
   394     if (gameType = gmtNet) then
       
   395         SendConsoleCommand(s)
   387     end
   396     end
   388 else
   397 else
   389     begin
   398     begin
   390     if liveLua then
   399     if liveLua then
   391         LuaParseString(s)
   400         LuaParseString(s)