mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Updates "Check New Players" verb (#27963)
* updates "Check New Players" verb * bam
This commit is contained in:
@@ -78,28 +78,39 @@
|
||||
if(!check_rights(R_MENTOR|R_MOD|R_ADMIN))
|
||||
return
|
||||
|
||||
var/age = alert(src, "Age check", "Show accounts yonger then _____ days","7", "30" , "All")
|
||||
|
||||
if(age == "All")
|
||||
age = 9999999
|
||||
else
|
||||
age = text2num(age)
|
||||
var/age = input(src, "Show accounts younger then ____ days", "Age check") as num|null
|
||||
var/playtime_hours = input(src, "Show accounts with less than ____ hours", "Playtime check") as num|null
|
||||
if(isnull(age))
|
||||
age = -1
|
||||
if(isnull(playtime_hours))
|
||||
playtime_hours = -1
|
||||
if(age <= 0 && playtime_hours <= 0)
|
||||
return
|
||||
|
||||
var/missing_ages = 0
|
||||
var/msg = ""
|
||||
var/is_admin = check_rights(R_ADMIN, 0)
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(C?.holder?.fakekey && !check_rights(R_ADMIN, FALSE))
|
||||
continue // Skip those in stealth mode if an admin isnt viewing the panel
|
||||
|
||||
if(C.player_age == "Requires database")
|
||||
if(!isnum(C.player_age))
|
||||
missing_ages = 1
|
||||
continue
|
||||
if(C.player_age < age)
|
||||
if(check_rights(R_ADMIN, 0))
|
||||
if(is_admin)
|
||||
msg += "[key_name_admin(C.mob)]: [C.player_age] days old<br>"
|
||||
else
|
||||
msg += "[key_name_mentor(C.mob)]: [C.player_age] days old<br>"
|
||||
|
||||
var/client_hours = C.get_exp_type_num(EXP_TYPE_LIVING) + C.get_exp_type_num(EXP_TYPE_GHOST)
|
||||
client_hours /= 60 // minutes to hours
|
||||
if(client_hours < playtime_hours)
|
||||
if(is_admin)
|
||||
msg += "[key_name_admin(C.mob)]: [client_hours] living + ghost hours<br>"
|
||||
else
|
||||
msg += "[key_name_mentor(C.mob)]: [client_hours] living + ghost hours<br>"
|
||||
|
||||
if(missing_ages)
|
||||
to_chat(src, "Some accounts did not have proper ages set in their clients. This function requires database to be present")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user