mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 20:11:04 +01:00
Reworking Bot API and optimizing for loops in admin code (#6355)
This commit is contained in:
committed by
Werner
parent
5bf33373c9
commit
81e7f29878
@@ -116,15 +116,16 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
var/admin_number_present = 0
|
||||
var/admin_number_afk = 0
|
||||
|
||||
for(var/client/X in admins)
|
||||
if((R_ADMIN|R_MOD) & X.holder.rights)
|
||||
for(var/s in staff)
|
||||
var/client/C = s
|
||||
if((R_ADMIN|R_MOD) & C.holder.rights)
|
||||
admin_number_present++
|
||||
if(X.is_afk())
|
||||
if(C.is_afk())
|
||||
admin_number_afk++
|
||||
if(X.prefs.toggles & SOUND_ADMINHELP)
|
||||
sound_to(X, 'sound/effects/adminhelp.ogg')
|
||||
if(C.prefs.toggles & SOUND_ADMINHELP)
|
||||
sound_to(C, 'sound/effects/adminhelp.ogg')
|
||||
|
||||
to_chat(X, msg)
|
||||
to_chat(C, msg)
|
||||
|
||||
//show it to the person adminhelping too
|
||||
to_chat(src, "<font color='blue'>PM to-<b>Staff </b>: [original_msg]</font>")
|
||||
|
||||
Reference in New Issue
Block a user