MantisBT - Soldat Dedicated Server
View Issue Details
0000590Soldat Dedicated ServerScripting Corepublic2014-10-09 19:022014-10-10 13:06
Mighty 
ExHunter 
highminoralways
resolvedfixed 
x86WindowsXP SP3
2.7.8b1 
 
0000590: OnTCPMessage's Result doesn't change server's behaviour.
OnTCPMessage's Result doesn't stop the commands from execution regardless of it's value.
function TCPMessage(Ip: string; Port: Word; Text: string): boolean;
begin
  WriteLn('TCPMessage('+Ip+','+inttostr(Port)+','+Text+')');
  Result := TRUE;
  //Result := FALSE;
end;

begin
  Game.OnTCPMessage := @TCPMessage;
end.
No tags attached.
Issue History
2014-10-09 19:02MightyNew Issue
2014-10-09 19:28ExHunterNote Added: 0002337
2014-10-10 07:44MightyNote Added: 0002338
2014-10-10 13:06ExHunterNote Added: 0002339
2014-10-10 13:06ExHunterNote Deleted: 0002339
2014-10-10 13:06ExHunterNote Added: 0002340
2014-10-10 13:06ExHunterStatusnew => resolved
2014-10-10 13:06ExHunterResolutionopen => fixed
2014-10-10 13:06ExHunterAssigned To => ExHunter

Notes
(0002337)
ExHunter   
2014-10-09 19:28   
Oh this was never supposed to be a function.

My bad. I will look tomorrow what I could do.
(0002338)
Mighty   
2014-10-10 07:44   
Please make it a function though, so we can, for example, replace default /say command with something neat.
(0002340)
ExHunter   
2014-10-10 13:06   
Made it a procedure.

Added TGame.OnTCPCommand of type TOnTCPCommandEvent
TOnTCPCommandEvent = function(Ip: string; Port: Word; Command: string): Boolean;