From 0bd54bd612fe458f348d258f6eb33b7f8b810675 Mon Sep 17 00:00:00 2001 From: cib Date: Sun, 8 Jul 2012 20:16:18 +0200 Subject: [PATCH] Admins will now be notified if a reported player logs in. --- code/game/player/admin_report.dm | 10 ++++++++++ code/modules/mob/new_player/login.dm | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/code/game/player/admin_report.dm b/code/game/player/admin_report.dm index 5be189222eb..1234bab076f 100644 --- a/code/game/player/admin_report.dm +++ b/code/game/player/admin_report.dm @@ -78,6 +78,16 @@ client/proc/unhandled_reports() return 0 +// checks if the player has an unhandled report against him +client/proc/is_reported() + var/list/reports = load_reports() + + for(var/datum/admin_report/N in reports) + if(N.offender_key == src.key) + return 1 + + return 0 + // display only the reports that haven't been handled client/proc/display_admin_reports() set category = "Admin" diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index 2718a1e8312..886ce1321b9 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -42,6 +42,10 @@ if(client.has_news()) src << "There are some unread news for you! Please make sure to read all news, as they may contain important updates about roleplay rules or canon." + if(client.unhandled_reports()) + src << "There are some unhandled reports." + if(client.is_reported()) + log_admin("A player who has unhandled admin reports against him just logged in: [client.key]") new_player_panel()