[MIRROR] AdminPM rights (#8899)

Co-authored-by: Novacat <35587478+Novacat@users.noreply.github.com>
Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2
2024-09-04 14:46:04 +02:00
committed by GitHub
co-authored by Novacat CHOMPStation2 Kashargul
parent 255536d8b5
commit 56af2f7c3a
+4
View File
@@ -203,11 +203,15 @@
if(irc)
log_admin("PM: [key_name(src)]->IRC: [rawmsg]")
for(var/client/X in GLOB.admins)
if(!check_rights(R_ADMIN|R_SERVER, 0, X)) //CHOMPEdit
continue
to_chat(X, "<span class='pm notice'><B>PM: [key_name(src, X, 0)]-&gt;IRC:</B> [keywordparsedmsg]</span>")
else
log_admin("PM: [key_name(src)]->[key_name(recipient)]: [rawmsg]")
//we don't use message_admins here because the sender/receiver might get it too
for(var/client/X in GLOB.admins)
if(!check_rights(R_ADMIN|R_SERVER, 0, X)) //CHOMPEdit
continue
if(X.key!=key && X.key!=recipient.key) //check client/X is an admin and isn't the sender or recipient
to_chat(X, "<span class='pm notice'><B>PM: [key_name(src, X, 0)]-&gt;[key_name(recipient, X, 0)]:</B> [keywordparsedmsg]</span>" )