Local IP in player_login event when joining hub server from BungeeCord.
LadyCailin opened this issue ยท 3 comments
CMDHELPER-2657 - Reported by spudwaffle on 2013-04-24 03:41:40 UTC
Calling {{@event[ip]}} in the {{player_login}} event when a player logs into the server under BungeeCord returns {{127.0.0.1}}, not the player's IP. Calling {{pinfo(player(), 3)}} in the {{player_join}} event or in other code returns the correct IP.
Example Code:
{{bind(player_login, null, null, @event,
console(@event[ip])
)}}
Output: {{127.0.0.1}}
{{bind(player_join, null, null, @event,
console(pinfo(player(), 3))
)}}
Output: {{1.2.3.4}}
This work-around for this bug requires to check the player's IP at join time, requiring the server to load chunks and opening it up to a DoS attack by an IP banned player.
Comment by EntityReborn on 2013-04-24 05:30:06 UTC
This would be an issue of spigot, not bungeecord. Please make a bug report with them, mentioning that their PlayerLoginEvent isn't passing the correct IP when connecting via bungeecord.
Comment by wizjany on 2013-04-24 11:48:03 UTC
I thought bungeecord had a setting for this, but yea, not a CH error
Comment by spudwaffle on 2013-04-24 15:27:10 UTC
I thought it was a CommandHelper error because vanilla IP bans still work. But, on further thought, it is a Spigot error because CommandHelper uses the Bukkit API while the vanilla IP ban system does not. I'll submit a bug to Spigot.