diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm
index f412f9d5a72..6f6f72af472 100644
--- a/code/modules/admin/player_panel.dm
+++ b/code/modules/admin/player_panel.dm
@@ -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
@@ -304,7 +306,7 @@
[M_rname_as_key]
[previous_names]
[M_key]
- [M.lastKnownIP]
+ [M_ip_address]
[is_antagonist]
[REF(M)]