diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index e765eba83ce..735cb06c8b8 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -29,7 +29,9 @@ else targets["(No Mob) - [T]"] = T var/list/sorted = sortList(targets) - var/target = input(src,"To whom shall we send a message?","Admin PM",null) in sorted|null + var/target = input(src, "To whom shall we send a message?", "Admin PM") as null|anything in sorted + if(!target) + return cmd_admin_pm(targets[target],null) feedback_add_details("admin_verb","APM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 94521fa71e8..25f662392e4 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -572,13 +572,17 @@ Traitors and the like can also be revived with the previous role mostly intact. /client/proc/cmd_admin_create_centcom_report() set category = "Special Verbs" set name = "Create Command Report" + if(!holder) to_chat(src, "Only administrators may use this command.") return + var/reporttitle var/reportbody var/reporter = null - var/reporttype = input(usr, "Choose whether to use a template or custom report.", "Create Command Report") in list("Template", "Custom", "Cancel") + var/reporttype = input(usr, "Choose whether to use a template or custom report.", "Create Command Report") as null|anything in list("Template", "Custom") + if(!reporttype) + return switch(reporttype) if("Template") establish_db_connection(dbcon) @@ -600,7 +604,9 @@ Traitors and the like can also be revived with the previous role mostly intact. to_chat(src, "There are no templates in the database.") return - reporttitle = input(usr, "Please select a command report template.", "Create Command Report") in template_names + reporttitle = input(usr, "Please select a command report template.", "Create Command Report") as null|anything in template_names + if(!reporttitle) + return reportbody = templates[reporttitle] if("Custom") @@ -610,8 +616,6 @@ Traitors and the like can also be revived with the previous role mostly intact. reportbody = sanitize(input(usr, "Please enter anything you want. Anything. Serious.", "Body", "") as message|null, extra = 0) if(!reportbody) return - else - return if (reporttype == "Template") reporter = sanitizeSafe(input(usr, "Please enter your CCIA name. (blank for CCIAAMS)", "Name") as text|null) diff --git a/html/changelogs/geeves-no_go_back.yml b/html/changelogs/geeves-no_go_back.yml new file mode 100644 index 00000000000..4c247e15427 --- /dev/null +++ b/html/changelogs/geeves-no_go_back.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - bugfix: "You can now properly cancel out of an Admin PM prompt or a Command Report Creation by pressing cancel." \ No newline at end of file