View Issue Details

IDProjectCategoryView StatusLast Update
0009333Multi Theft Auto : San AndreasServerpublic2016-08-24 04:06
Reporterjoaosilva099Assigned Toqaisjp 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.5.2 
Target Version1.5.3Fixed in Version1.5.3 
Summary0009333: Redirecting a player to the same server causes wrong notification on quit event
Description

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

Additional Information

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.

TagsNo tags attached.

Activities

AlexTMjugador

2016-08-17 09:57

viewer   ~~0025058

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.

joaosilva099

2016-08-17 19:55

viewer   ~~0025059

Last edited: 2016-08-17 20:06

View 2 revisions

Or just display the server public IP as it would if you passed an actual IP address to the function

EDIT:
Passing an empty string to the function will only work when redirecting to the same server (not diferent server in the same IP) so they can remove the [Redirected to...] message when serverIP is an empty string (meaning the player got redirected to the same server)

qaisjp

2016-08-24 04:05

administrator   ~~0025080

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).

Fixed in https://github.com/multitheftauto/mtasa-blue/commit/96fe3bfd01fb40db93cfd726be0da1eb496d030c

Issue History

Date Modified Username Field Change