Merge pull request #2420 from Rozen4334/general-devel
Return loopback IP if RealPlayer is false
This commit is contained in:
commit
acad35b5e4
2 changed files with 2 additions and 1 deletions
|
|
@ -22,6 +22,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
* Added a new `DisablePrimeBombs` config option (`false` by default). Highly recommended to set this to `true` in order to prevent griefing on servers doing a `for the worthy` play-through, since the prime bombs on this seed can destroy most tiles and bypass region protection. (@moisterrific)
|
* Added a new `DisablePrimeBombs` config option (`false` by default). Highly recommended to set this to `true` in order to prevent griefing on servers doing a `for the worthy` play-through, since the prime bombs on this seed can destroy most tiles and bypass region protection. (@moisterrific)
|
||||||
* Added a new `/respawn` command that lets you respawn yourself or another player. Respawning yourself requires the `tshock.respawn` permission and respawning others requires the `tshock.respawn.other` permission. The full command syntax is `/respawn [player]`. (@moisterrific)
|
* Added a new `/respawn` command that lets you respawn yourself or another player. Respawning yourself requires the `tshock.respawn` permission and respawning others requires the `tshock.respawn.other` permission. The full command syntax is `/respawn [player]`. (@moisterrific)
|
||||||
* Added a notification message and silent command support for permanently changing a target player's user group. Now players who received a group change will be notified of their new group if they are currently online. (@moisterrific, @QuiCM)
|
* Added a notification message and silent command support for permanently changing a target player's user group. Now players who received a group change will be notified of their new group if they are currently online. (@moisterrific, @QuiCM)
|
||||||
|
* Changed the TSPlayer IP method to return the loopback IP if RealPlayer is false. (@Rozen4334)
|
||||||
|
|
||||||
## TShock 4.5.5
|
## TShock 4.5.5
|
||||||
* Changed the world autosave message so that it no longer warns of a "potential lag spike." (@hakusaro)
|
* Changed the world autosave message so that it no longer warns of a "potential lag spike." (@hakusaro)
|
||||||
|
|
|
||||||
|
|
@ -892,7 +892,7 @@ namespace TShockAPI
|
||||||
CacheIP = RealPlayer ? (Netplay.Clients[Index].Socket.IsConnected()
|
CacheIP = RealPlayer ? (Netplay.Clients[Index].Socket.IsConnected()
|
||||||
? TShock.Utils.GetRealIP(Netplay.Clients[Index].Socket.GetRemoteAddress().ToString())
|
? TShock.Utils.GetRealIP(Netplay.Clients[Index].Socket.GetRemoteAddress().ToString())
|
||||||
: "")
|
: "")
|
||||||
: "";
|
: "127.0.0.1";
|
||||||
else
|
else
|
||||||
return CacheIP;
|
return CacheIP;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue