Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ckey check verb #5073

Merged
merged 7 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ GLOBAL_LIST_INIT(admin_verbs_default, list(
/client/proc/togglenichelogs,
/datum/admins/proc/display_tags,
/datum/admins/proc/player_notes_show,
/datum/admins/proc/check_ckey,
/datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
/datum/admins/proc/togglelooc, /*toggles ooc on/off for everyone*/
/datum/admins/proc/toggledsay, /*toggles dsay on/off for everyone*/
Expand Down
22 changes: 22 additions & 0 deletions code/modules/admin/tabs/admin_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,28 @@
dat += "</body></html>"
show_browser(usr, dat, "Admin record for [key]", "adminplayerinfo", "size=480x480")

/datum/admins/proc/check_ckey(target_key as text)
set name = "Check CKey"
set category = "Admin"

var/mob/user = usr
if (!istype(src, /datum/admins))
src = user.client.admin_holder
if (!istype(src, /datum/admins) || !(rights & R_MOD))
to_chat(user, "Error: you are not an admin!")
return
if(!target_key)
harryob marked this conversation as resolved.
Show resolved Hide resolved
to_chat(user, "Error: No key detected!")
return
to_chat(user, SPAN_WARNING("Checking Ckey: [target_key]"))
var/list/keys = analyze_ckey(target_key)
if(!keys)
to_chat(user, SPAN_WARNING("No results for [target_key]."))
return
to_chat(user, SPAN_WARNING("Check CKey Results: [keys.Join(", ")]"))
realforest2001 marked this conversation as resolved.
Show resolved Hide resolved

log_admin("[key_name(user)] analyzed ckey '[target_key]'")

/datum/admins/proc/sleepall()
set name = "Sleep All"
set category = "Admin.InView"
Expand Down