View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0009333||Multi Theft Auto : San Andreas||Server||public||2016-08-17 01:41||2016-08-24 04:06|
|Target Version||1.5.3||Fixed in Version||1.5.3|
|Summary||0009333: Redirecting a player to the same server causes wrong notification on quit event|
When a player gets redirected to a server, [Redirected to IP:PORT] to be appended to the QUIT server console log.
When a player is redirected to the same server (supplying "" as IP to redirectPlayer function) the information becomes wrong and useless, so it should be removed.
QUIT: X left the game [Quit][Redirected to :22003]
|Steps To Reproduce|
run redirectPlayer(getPlayerFromName("YOUR NAME"), "", 0)
check server console
It's simple to solve, just check if the IP the player is getting redirected to is the same as the one it's currently connected to.
|Tags||No tags attached.|
I don't think that is so useless, because multiple MTA servers can run on the same machine and IP by making sure each one uses different ports. It is useful to make multigamemode servers and such.
However, I agree that the server console log looks a bit ugly in this case. Replacing that empty string with the server IP (it could be something like 127.0.0.1 to allow for quick log understanding) could be a solution.
Or just display the server public IP as it would if you passed an actual IP address to the function
Indeed, setting the IP as "" will redirect the player to the same host. The port can actually be changed to anything (when the IP is "") to connect to another server (use 0 to connect to the port of the current server).