[MIRROR] Fixes the admin log when adding a new admin from the permissions panel not displaying the ckey of the new admin [MDB IGNORE] (#23635)

* Fixes the admin log when adding a new admin from the permissions panel not displaying the ckey of the new admin (#78245)

## About The Pull Request
It was just displaying nothing, which was only a mild annoyance, but
after tolerating it for a few years, today I've had enough and fixed it.

## Why It's Good For The Game
Finally others can know who was added to the team without having
`R_PERMISSIONS` themselves.

![image](https://github.com/tgstation/tgstation/assets/58045821/5a945bea-1f1f-4b3d-bd96-c18062cecae4)

## Changelog

🆑 GoldenAlpharex
fix: The message sent to admins when a new admin has been added via the
Permissions Panel will now properly show the new admin's ckey.
/🆑

* Fixes the admin log when adding a new admin from the permissions panel not displaying the ckey of the new admin

---------

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-09-11 23:19:30 +02:00
committed by GitHub
parent 78de8a65d3
commit 996d022afe

View File

@@ -192,6 +192,10 @@
admin_ckey = add_admin(admin_ckey, admin_key, use_db)
if(!admin_ckey)
return
if(!admin_key) // Prevents failures in logging admin rank changes.
admin_key = admin_ckey
change_admin_rank(admin_ckey, admin_key, use_db, null, legacy_only)
if("remove")
remove_admin(admin_ckey, admin_key, use_db, D)