Skip to content

Commit

Permalink
[MIRROR] Adds localhost case to the Player Panel [MDB IGNORE] (#25333)
Browse files Browse the repository at this point in the history
* Adds `localhost` case to the Player Panel (#79999)

## About The Pull Request

![image](https://github.com/tgstation/tgstation/assets/34697715/2fd2b8fd-dc86-4150-8f0f-b8ac6a5dc03c)

This always confused me debugging on local, the thing in the parenthesis
is supposed to the be the IP Address of the client currently in the mob.
However, local hosts have a `null` IP Address (BYOND thing). So, let's
add handling to this so this little thing won't be so confusing anymore
## Why It's Good For The Game

![image](https://github.com/tgstation/tgstation/assets/34697715/b365e107-cfcf-497c-92da-f5930666cbb0)

Better.
## Changelog
Not really relevant.

* Adds `localhost` case to the Player Panel

---------

Co-authored-by: san7890 <[email protected]>
  • Loading branch information
2 people authored and FFMirrorBot committed Nov 29, 2023
1 parent e707821 commit 6f9732a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/modules/admin/player_panel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@
else
M_job = "Ghost"

var/M_ip_address = isnull(M.lastKnownIP) ? "+localhost+" : M.lastKnownIP

var/M_name = html_encode(M.name)
var/M_rname = html_encode(M.real_name)
var/M_rname_as_key = html_encode(ckey(M.real_name)) // so you can ignore punctuation
Expand Down Expand Up @@ -304,7 +306,7 @@
<span hidden id="data[i]_rname_as_key">[M_rname_as_key]</span>
<span hidden id="data[i]_prevnames">[previous_names]</span>
<span hidden id="data[i]_key">[M_key]</span>
<span hidden id="data[i]_lastip">[M.lastKnownIP]</span>
<span hidden id="data[i]_lastip">[M_ip_address]</span>
<span hidden id="data[i]_isantag">[is_antagonist]</span>
<span hidden id="data[i]_ref">[REF(M)]</span>
</a>
Expand Down

0 comments on commit 6f9732a

Please sign in to comment.