diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm index 3eaed85c303..abb0b604069 100644 --- a/code/controllers/verbs.dm +++ b/code/controllers/verbs.dm @@ -7,7 +7,7 @@ set name = "Restart Controller" set desc = "Restart one of the various periodic loop controllers for the game (be careful!)" - if(!holder) + if(!check_rights(R_DEBUG)) return switch(controller) if("Master") @@ -26,7 +26,8 @@ set name = "Debug Controller" set desc = "Debug the various periodic loop controllers for the game (be careful!)" - if(!holder) return + if(!check_rights(R_DEBUG)) + return switch(controller) if("failsafe") debug_variables(Failsafe) diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index 09df94dc06e..1f55fa11f70 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -299,7 +299,8 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null) datum/admins/proc/DB_ban_unban_by_id(var/id) - if(!check_rights(R_BAN)) return + if(!check_rights(R_BAN)) + return var/sql = "SELECT ckey FROM [format_table_name("ban")] WHERE id = [id]" @@ -343,9 +344,9 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) /client/proc/DB_ban_panel() set category = "Admin" set name = "Banning Panel" - set desc = "Edit admin permissions" + set desc = "DB Ban Panel" - if(!holder) + if(!check_rights(R_BAN)) return holder.DB_ban_panel() @@ -356,7 +357,8 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) if(!usr.client) return - if(!check_rights(R_BAN)) return + if(!check_rights(R_BAN)) + return establish_db_connection() if(!GLOB.dbcon.IsConnected()) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 958dedae362..36233909903 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -69,7 +69,10 @@ GLOBAL_VAR_INIT(nologevent, 0) body += "Options panel for [M]" if(M.client) body += " played by [M.client] " - body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\] " + if(check_rights(R_PERMISSIONS, 0)) + body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\] " + else + body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\] " body += "\[" + M.client.get_exp_type(EXP_TYPE_CREW) + " as [EXP_TYPE_CREW]\]" if(isnewplayer(M)) @@ -281,7 +284,7 @@ GLOBAL_VAR_INIT(nologevent, 0) /datum/admins/proc/vpn_whitelist() set category = "Admin" set name = "VPN Ckey Whitelist" - if(!check_rights(R_ADMIN)) + if(!check_rights(R_BAN)) return var/key = stripped_input(usr, "Enter ckey to add/remove, or leave blank to cancel:", "VPN Whitelist add/remove", max_length=32) if(key) @@ -761,19 +764,6 @@ GLOBAL_VAR_INIT(nologevent, 0) world.update_status() feedback_add_details("admin_verb","TR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/datum/admins/proc/toggle_aliens() - set category = "Event" - set desc="Toggle alien mobs" - set name="Toggle Aliens" - - if(!check_rights(R_EVENT)) - return - - GLOB.aliens_allowed = !GLOB.aliens_allowed - log_admin("[key_name(usr)] toggled aliens to [GLOB.aliens_allowed].") - message_admins("[key_name_admin(usr)] toggled aliens [GLOB.aliens_allowed ? "on" : "off"].") - feedback_add_details("admin_verb","TA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - /datum/admins/proc/delay() set category = "Server" set desc="Delay the game start/end" diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index a627c96148f..527540e9490 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -33,7 +33,8 @@ /client/proc/investigate_show( subject in GLOB.investigate_log_subjects ) set name = "Investigate" set category = "Admin" - if(!holder) return + if(!check_rights(R_ADMIN)) + return switch(subject) if("notes") show_note() diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index b7f6a9d6bc9..70d18b42cb3 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -10,11 +10,8 @@ GLOBAL_LIST_INIT(admin_verbs_default, list( GLOBAL_LIST_INIT(admin_verbs_admin, list( /client/proc/check_antagonists, /*shows all antags*/ /datum/admins/proc/show_player_panel, - /client/proc/player_panel, /*shows an interface for all players, with links to various panels (old style)*/ /client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/ /client/proc/invisimin, /*allows our mob to go invisible/visible*/ - /datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/ - /datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/ /datum/admins/proc/announce, /*priority announce something to all clients.*/ /client/proc/colorooc, /*allows us to set a custom colour for everything we say in ooc*/ /client/proc/resetcolorooc, /*allows us to set a reset our ooc color*/ @@ -23,7 +20,6 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list( /client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/ /client/proc/cmd_admin_pm_panel, /*admin-pm list*/ /client/proc/cmd_admin_pm_by_key_panel, /*admin-pm list by key*/ - /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/ /client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/ /client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/ /client/proc/cmd_admin_open_logging_view, @@ -55,13 +51,11 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list( /datum/admins/proc/PlayerNotes, /client/proc/cmd_mentor_say, /datum/admins/proc/show_player_notes, - /datum/admins/proc/vpn_whitelist, /client/proc/free_slot, /*frees slot for chosen job*/ /client/proc/toggleattacklogs, /client/proc/toggleadminlogs, /client/proc/toggledebuglogs, /client/proc/update_mob_sprite, - /client/proc/toggledrones, /client/proc/man_up, /client/proc/global_man_up, /client/proc/delbook, @@ -69,22 +63,17 @@ GLOBAL_LIST_INIT(admin_verbs_admin, list( /client/proc/empty_ai_core_toggle_latejoin, /client/proc/aooc, /client/proc/freeze, - /client/proc/alt_check, /client/proc/secrets, - /client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */ - /client/proc/change_human_appearance_self, /* Allows the human-based mob itself to change its basic appearance */ /client/proc/debug_variables, /client/proc/reset_all_tcs, /*resets all telecomms scripts*/ /client/proc/toggle_mentor_chat, /client/proc/toggle_advanced_interaction, /*toggle admin ability to interact with not only machines, but also atoms such as buttons and doors*/ - /client/proc/list_ssds_afks, - /client/proc/cmd_admin_headset_message, - /client/proc/spawn_floor_cluwne + /client/proc/list_ssds_afks )) GLOBAL_LIST_INIT(admin_verbs_ban, list( - /client/proc/unban_panel, - /client/proc/jobbans, - /client/proc/stickybanpanel + /client/proc/ban_panel, + /client/proc/stickybanpanel, + /datum/admins/proc/vpn_whitelist )) GLOBAL_LIST_INIT(admin_verbs_sounds, list( /client/proc/play_local_sound, @@ -100,7 +89,6 @@ GLOBAL_LIST_INIT(admin_verbs_event, list( /client/proc/drop_bomb, /client/proc/cinematic, /client/proc/one_click_antag, - /datum/admins/proc/toggle_aliens, /client/proc/cmd_admin_add_freeform_ai_law, /client/proc/cmd_admin_add_random_ai_law, /client/proc/make_sound, @@ -110,6 +98,7 @@ GLOBAL_LIST_INIT(admin_verbs_event, list( /client/proc/show_tip, /client/proc/cmd_admin_change_custom_event, /datum/admins/proc/access_news_network, /*allows access of newscasters*/ + /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/ /client/proc/cmd_admin_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/ /client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/ /client/proc/response_team, // Response Teams admin verb @@ -117,7 +106,10 @@ GLOBAL_LIST_INIT(admin_verbs_event, list( /client/proc/fax_panel, /client/proc/event_manager_panel, /client/proc/modify_goals, - /client/proc/outfit_manager + /client/proc/outfit_manager, + /client/proc/cmd_admin_headset_message, + /client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */ + /client/proc/change_human_appearance_self /* Allows the human-based mob itself to change its basic appearance */ )) GLOBAL_LIST_INIT(admin_verbs_spawn, list( @@ -126,24 +118,26 @@ GLOBAL_LIST_INIT(admin_verbs_spawn, list( /client/proc/admin_deserialize )) GLOBAL_LIST_INIT(admin_verbs_server, list( + /client/proc/reload_admins, /client/proc/Set_Holiday, /datum/admins/proc/startnow, /datum/admins/proc/restart, /datum/admins/proc/delay, /datum/admins/proc/toggleaban, + /datum/admins/proc/toggleenter, /*toggles whether people can join the current game*/ + /datum/admins/proc/toggleguests, /*toggles whether guests can join the current game*/ /client/proc/toggle_log_hrefs, /client/proc/everyone_random, /datum/admins/proc/toggleAI, /client/proc/cmd_admin_delete, /*delete an instance/object/mob/etc*/ - /client/proc/cmd_debug_del_all, /client/proc/cmd_debug_del_sing, - /datum/admins/proc/toggle_aliens, /client/proc/delbook, /client/proc/view_flagged_books, /client/proc/toggle_antagHUD_use, /client/proc/toggle_antagHUD_restrictions, /client/proc/set_ooc, - /client/proc/reset_ooc + /client/proc/reset_ooc, + /client/proc/toggledrones )) GLOBAL_LIST_INIT(admin_verbs_debug, list( /client/proc/cmd_admin_list_open_jobs, @@ -152,9 +146,7 @@ GLOBAL_LIST_INIT(admin_verbs_debug, list( /client/proc/debug_controller, /client/proc/cmd_debug_mob_lists, /client/proc/cmd_admin_delete, - /client/proc/cmd_debug_del_all, /client/proc/cmd_debug_del_sing, - /client/proc/reload_admins, /client/proc/restart_controller, /client/proc/enable_debug_verbs, /client/proc/toggledebuglogs, @@ -197,7 +189,7 @@ GLOBAL_LIST_INIT(admin_verbs_mod, list( /client/proc/player_panel_new, /client/proc/dsay, /datum/admins/proc/show_player_panel, - /client/proc/jobbans, + /client/proc/ban_panel, /client/proc/debug_variables /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/ )) GLOBAL_LIST_INIT(admin_verbs_mentor, list( @@ -367,19 +359,8 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( to_chat(mob, "Invisimin on. You are now as invisible as a ghost.") mob.remove_from_all_data_huds() -/client/proc/player_panel() - set name = "Player Panel" - set category = "Admin" - - if(!check_rights(R_ADMIN)) - return - - holder.player_panel_old() - feedback_add_details("admin_verb","PP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - return - /client/proc/player_panel_new() - set name = "Player Panel New" + set name = "Player Panel" set category = "Admin" if(!check_rights(R_ADMIN|R_MOD)) @@ -401,22 +382,8 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( feedback_add_details("admin_verb","CHA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return -/client/proc/jobbans() - set name = "Display Job bans" - set category = "Admin" - - if(!check_rights(R_ADMIN|R_MOD)) - return - - if(config.ban_legacy_system) - holder.Jobbans() - else - holder.DB_ban_panel() - feedback_add_details("admin_verb","VJB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - return - -/client/proc/unban_panel() - set name = "Unban Panel" +/client/proc/ban_panel() + set name = "Ban Panel" set category = "Admin" if(!check_rights(R_BAN)) @@ -809,7 +776,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( set desc = "Allows you to change the mob appearance" set category = null - if(!check_rights(R_ADMIN)) + if(!check_rights(R_EVENT)) return if(!istype(H)) @@ -835,7 +802,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( set desc = "Allows the mob to change its appearance" set category = null - if(!check_rights(R_ADMIN)) + if(!check_rights(R_EVENT)) return if(!istype(H)) @@ -980,8 +947,8 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list( else to_chat(usr, "You now won't get debug log messages") -/client/proc/man_up(mob/T as mob in GLOB.mob_list) - set category = "Admin" +/client/proc/man_up(mob/T as mob in GLOB.player_list) + set category = null set name = "Man Up" set desc = "Tells mob to man up and deal with it." diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm index 2122f88f4ed..699eca075bb 100644 --- a/code/modules/admin/banjob.dm +++ b/code/modules/admin/banjob.dm @@ -42,20 +42,6 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ## else return 0 -/* -DEBUG -/mob/verb/list_all_jobbans() - set name = "list all jobbans" - - for(var/s in jobban_keylist) - to_chat(world, s) - -/mob/verb/reload_jobbans() - set name = "reload jobbans" - - jobban_loadbanfile() -*/ - /proc/jobban_loadbanfile() if(config.ban_legacy_system) var/savefile/S=new("data/job_full.ban") diff --git a/code/modules/admin/machine_upgrade.dm b/code/modules/admin/machine_upgrade.dm index 1e569b51d2d..4f38f70613d 100644 --- a/code/modules/admin/machine_upgrade.dm +++ b/code/modules/admin/machine_upgrade.dm @@ -1,20 +1,20 @@ /proc/machine_upgrade(obj/machinery/M in world) set name = "Tweak Component Ratings" - set category = "Debug" + set category = null - if(!check_rights(R_DEBUG)) + if(!check_rights(R_DEBUG)) return - + if(!istype(M)) to_chat(usr, "This can only be used on subtypes of /obj/machinery.") return - + var/new_rating = input("Enter new rating:","Num") as num if(!isnull(new_rating) && M.component_parts) for(var/obj/item/stock_parts/P in M.component_parts) P.rating = new_rating M.RefreshParts() - + message_admins("[key_name_admin(usr)] has set the component rating of [M] to [new_rating]") log_admin("[key_name(usr)] has set the component rating of [M] to [new_rating]") diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 1c6bab4d3cd..c2248261baa 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -332,65 +332,6 @@ usr << browse(dat, "window=players;size=600x480") -//The old one -/datum/admins/proc/player_panel_old() - if(!usr.client.holder) - return - var/dat = "Player Menu" - dat += "" - //add to this if wanting to add back in IP checking - //add if you want to know their ip to the lists below - var/list/mobs = sortmobs() - - for(var/mob/M in mobs) - if(!M.ckey) continue - - dat += "" - if(isAI(M)) - dat += "" - else if(isrobot(M)) - dat += "" - else if(issmall(M)) - dat += "" - else if(ishuman(M)) - dat += "" - else if(istype(M, /mob/living/silicon/pai)) - dat += "" - else if(isnewplayer(M)) - dat += "" - else if(isobserver(M)) - dat += "" - else if(isalien(M)) - dat += "" - else - dat += "" - - - if(istype(M,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(H.mind && H.mind.assigned_role) - dat += "" - else - dat += "" - - - dat += {" - - - "} - switch(is_special_character(M)) - if(0) - dat += {""} - if(1) - dat += {""} - if(2) - dat += {""} - - dat += "
NameReal NameAssigned JobKeyOptionsPMTraitor?
IP:(IP: [M.lastKnownIP])
[M.name]AICyborgMonkey[M.real_name]pAINew PlayerGhostAlienUnknown[H.mind.assigned_role]NA[(M.client ? "[M.client]" : "No client")]XPMTraitor?Traitor?Traitor?
" - - usr << browse(dat, "window=players;size=640x480") - - /datum/admins/proc/check_antagonists_line(mob/M, caption = "", close = 1) var/logout_status diff --git a/code/modules/admin/tickets/adminticketsverbs.dm b/code/modules/admin/tickets/adminticketsverbs.dm index 406019745f8..4e8e79f2a26 100644 --- a/code/modules/admin/tickets/adminticketsverbs.dm +++ b/code/modules/admin/tickets/adminticketsverbs.dm @@ -5,7 +5,7 @@ set name = "Open Admin Ticket Interface" set category = "Admin" - if(!holder || !check_rights(R_ADMIN)) + if(!check_rights(R_ADMIN)) return SStickets.showUI(usr) @@ -14,7 +14,7 @@ set name = "Resolve All Open Admin Tickets" set category = null - if(!holder || !check_rights(R_ADMIN)) + if(!check_rights(R_ADMIN)) return if(alert("Are you sure you want to resolve ALL open admin tickets?","Resolve all open admin tickets?","Yes","No") != "Yes") diff --git a/code/modules/admin/tickets/mentorticketsverbs.dm b/code/modules/admin/tickets/mentorticketsverbs.dm index d65f4a30220..c7bec3e043d 100644 --- a/code/modules/admin/tickets/mentorticketsverbs.dm +++ b/code/modules/admin/tickets/mentorticketsverbs.dm @@ -5,7 +5,7 @@ set name = "Open Mentor Ticket Interface" set category = "Admin" - if(!holder || !check_rights(R_MENTOR|R_ADMIN)) + if(!check_rights(R_MENTOR|R_ADMIN)) return SSmentor_tickets.showUI(usr) @@ -14,7 +14,7 @@ set name = "Resolve All Open Mentor Tickets" set category = null - if(!holder || !check_rights(R_ADMIN)) + if(!check_rights(R_ADMIN)) return if(alert("Are you sure you want to resolve ALL open mentor tickets?","Resolve all open mentor tickets?","Yes","No") != "Yes") diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 0d5d51868f0..9e353630f4c 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2394,7 +2394,8 @@ usr.client.cmd_admin_direct_narrate(M) else if(href_list["subtlemessage"]) - if(!check_rights(R_ADMIN)) return + if(!check_rights(R_EVENT)) + return var/mob/M = locateUID(href_list["subtlemessage"]) usr.client.cmd_admin_subtle_message(M) diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index ca83b5bad08..e5e5dae03b5 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -117,7 +117,7 @@ feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/Getmob(var/mob/M in GLOB.mob_list) - set category = "Admin" + set category = null set name = "Get Mob" set desc = "Mob to teleport" @@ -134,7 +134,7 @@ feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/Getkey() - set category = "Admin" + set category = null set name = "Get Key" set desc = "Key to teleport" diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index dba9a5c26aa..d43bc322996 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -2,8 +2,7 @@ /client/proc/cmd_admin_pm_context(mob/M as mob in GLOB.mob_list) set category = null set name = "Admin PM Mob" - if(!holder) - to_chat(src, "Error: Admin-PM-Context: Only administrators may use this command.") + if(!check_rights(R_ADMIN)) return if( !ismob(M) || !M.client ) return cmd_admin_pm(M.client,null) @@ -13,8 +12,7 @@ /client/proc/cmd_admin_pm_panel() set category = "Admin" set name = "Admin PM Name" - if(!holder) - to_chat(src, "Error: Admin-PM-Panel: Only administrators may use this command.") + if(!check_rights(R_ADMIN)) return var/list/client/targets[0] for(var/client/T) @@ -36,8 +34,7 @@ /client/proc/cmd_admin_pm_by_key_panel() set category = "Admin" set name = "Admin PM Key" - if(!holder) - to_chat(src, "Error: Admin-PM-Panel: Only administrators may use this command.") + if(!check_rights(R_ADMIN)) return var/list/client/targets[0] for(var/client/T) diff --git a/code/modules/admin/verbs/alt_check.dm b/code/modules/admin/verbs/alt_check.dm deleted file mode 100644 index c8060f22036..00000000000 --- a/code/modules/admin/verbs/alt_check.dm +++ /dev/null @@ -1,20 +0,0 @@ -/client/proc/alt_check() - set category = "Admin" - set name = "Alt Account Checker" - - var/dat = {"Just to be sure you should try to also look up computer IDs/IPs on the server logs for a second opinion. -
Additionally make an attempt to introduce new players to the server -
"} - - if(GLOB.dbcon.IsConnected()) - for(var/client/C in GLOB.clients) - dat += "

[C.ckey] (Player Age: [C.player_age]) - [C.computer_id] / [C.address]
" - if(C.related_accounts_cid.len) - dat += "--Accounts associated with CID: " - dat += "[jointext(C.related_accounts_cid, " - ")]
" - if(C.related_accounts_ip.len) - dat += "--Accounts associated with IP: " - dat += "[jointext(C.related_accounts_ip, " - ")] " - usr << browse(dat, "window=alt_panel;size=640x480") - return - diff --git a/code/modules/admin/verbs/custom_event.dm b/code/modules/admin/verbs/custom_event.dm index b3d1543aedc..1284f9e0faf 100644 --- a/code/modules/admin/verbs/custom_event.dm +++ b/code/modules/admin/verbs/custom_event.dm @@ -3,8 +3,7 @@ set category = "Event" set name = "Change Custom Event" - if(!holder) - to_chat(src, "Only administrators may use this command.") + if(!check_rights(R_EVENT)) return var/input = input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", GLOB.custom_event_msg) as message|null diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 03b9dfb60e7..d2c05ff4f6c 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -168,7 +168,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) #endif /client/proc/callproc_datum(var/A as null|area|mob|obj|turf) - set category = "Debug" + set category = null set name = "Atom ProcCall" if(!check_rights(R_PROCCALL)) @@ -418,25 +418,6 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) else alert("Invalid mob") -//TODO: merge the vievars version into this or something maybe mayhaps -/client/proc/cmd_debug_del_all() - set category = "Debug" - set name = "Del-All" - - if(!check_rights(R_DEBUG)) - return - - // to prevent REALLY stupid deletions - var/blocked = list(/mob/living, /mob/living/carbon, /mob/living/carbon/human, /mob/dead, /mob/dead/observer, /mob/living/silicon, /mob/living/silicon/robot, /mob/living/silicon/ai) - var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in subtypesof(/obj) + subtypesof(/mob) - blocked - if(hsbitem) - for(var/atom/O in world) - if(istype(O, hsbitem)) - qdel(O) - log_admin("[key_name(src)] has deleted all instances of [hsbitem].") - message_admins("[key_name_admin(src)] has deleted all instances of [hsbitem].", 0) - feedback_add_details("admin_verb","DELA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - /client/proc/cmd_debug_del_sing() set category = "Debug" set name = "Del Singulo / Tesla" diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index 78f2647e429..2ffb4659486 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -108,7 +108,7 @@ /client/proc/reload_admins() set name = "Reload Admins" - set category = "Debug" + set category = "Server" if(!check_rights(R_SERVER)) return diff --git a/code/modules/admin/verbs/map_template_loadverb.dm b/code/modules/admin/verbs/map_template_loadverb.dm index edbca5a842f..0dc3dfc1791 100644 --- a/code/modules/admin/verbs/map_template_loadverb.dm +++ b/code/modules/admin/verbs/map_template_loadverb.dm @@ -2,8 +2,9 @@ set category = "Debug" set name = "Map template - Place" - if(!holder) + if(!check_rights(R_DEBUG)) return + var/datum/map_template/template var/map = input(usr, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template") as null|anything in GLOB.map_templates @@ -36,6 +37,9 @@ set category = "Debug" set name = "Map Template - Upload" + if(!check_rights(R_DEBUG)) + return + var/map = input(usr, "Choose a Map Template to upload to template storage","Upload Map Template") as null|file if(!map) return diff --git a/code/modules/admin/verbs/possess.dm b/code/modules/admin/verbs/possess.dm index 5cf4c34ffe2..3c1d0820dd7 100644 --- a/code/modules/admin/verbs/possess.dm +++ b/code/modules/admin/verbs/possess.dm @@ -2,6 +2,9 @@ set name = "Possess Obj" set category = null + if(!check_rights(R_POSSESS)) + return + if(istype(O,/obj/singularity)) if(config.forbid_singulo_possession) to_chat(usr, "It is forbidden to possess singularities.") @@ -35,6 +38,9 @@ set category = null //usr.loc = get_turf(usr) + if(!check_rights(R_POSSESS)) + return + if(usr.control_object && usr.name_archive) //if you have a name archived and if you are actually relassing an object usr.real_name = usr.name_archive usr.name = usr.real_name diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 7e9f397a855..3864f573597 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -51,7 +51,7 @@ if(!ismob(M)) return - if(!check_rights(R_SERVER|R_EVENT)) + if(!check_rights(R_EVENT)) return var/msg = clean_input("Message:", text("Subtle PM to [M.key]")) @@ -123,7 +123,7 @@ feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_direct_narrate(var/mob/M) // Targetted narrate -- TLE - set category = "Event" + set category = null set name = "Direct Narrate" if(!check_rights(R_SERVER|R_EVENT)) @@ -158,7 +158,7 @@ /client/proc/admin_headset_message(mob/M in GLOB.mob_list, sender = null) var/mob/living/carbon/human/H = M - if(!check_rights(R_ADMIN)) + if(!check_rights(R_EVENT)) return if(!istype(H)) @@ -572,7 +572,7 @@ Traitors and the like can also be revived with the previous role mostly intact. feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_rejuvenate(mob/living/M as mob in GLOB.mob_list) - set category = "Event" + set category = null set name = "Rejuvenate" if(!check_rights(R_REJUVINATE)) @@ -638,7 +638,7 @@ Traitors and the like can also be revived with the previous role mostly intact. /client/proc/cmd_admin_delete(atom/A as obj|mob|turf in view()) - set category = "Admin" + set category = null set name = "Delete" if(!check_rights(R_ADMIN)) @@ -1078,12 +1078,12 @@ Traitors and the like can also be revived with the previous role mostly intact. message_admins("Admin [key_name_admin(usr)] has disabled ERT calling.", 1) /client/proc/show_tip() - set category = "Admin" + set category = "Event" set name = "Show Custom Tip" set desc = "Sends a tip (that you specify) to all players. After all \ you're the experienced player here." - if(!check_rights(R_ADMIN)) + if(!check_rights(R_EVENT)) return var/input = input(usr, "Please specify your tip that you want to send to the players.", "Tip", "") as message|null diff --git a/code/modules/admin/verbs/spawnfloorcluwne.dm b/code/modules/admin/verbs/spawnfloorcluwne.dm deleted file mode 100644 index 37fd3057af4..00000000000 --- a/code/modules/admin/verbs/spawnfloorcluwne.dm +++ /dev/null @@ -1,30 +0,0 @@ -/client/proc/spawn_floor_cluwne() - set category = "Event" - set name = "Unleash Floor Cluwne" - set desc = "Pick a specific target or just let it select randomly and spawn the floor cluwne mob on the station. Be warned: spawning more than one may cause issues!" - var/mob/living/carbon/human/target - - if(!check_rights(R_EVENT)) - return - - var/confirm = alert("Are you sure you want to release a floor cluwne and kill a lot of people?", "Confirm Massacre", "Yes", "No") - if(confirm == "Yes") - - var/turf/T = get_turf(usr) - var/list/potential_targets = list() - for(var/mob/M in GLOB.player_list) - var/mob/living/carbon/human/H = M - if(!istype(H)) - continue - if(H.mind.assigned_role == "Cluwne") - continue - potential_targets += H - if(!potential_targets.len) //You're probably the only player on this damn station, spawn it yourself - to_chat(src, "No valid targets!") - return - target = input("Any specific target in mind? Please note only live, non cluwned, human targets are valid.", "Target", target) as null|anything in potential_targets - var/mob/living/simple_animal/hostile/floor_cluwne/FC = new /mob/living/simple_animal/hostile/floor_cluwne(T) - if(target) - FC.Acquire_Victim(target) - log_admin("[key_name(usr)] spawned floor cluwne[target ? ", initially targetting [target]": null].") - message_admins("[key_name(usr)] spawned floor cluwne[target ? ", initially targetting [target]": null].") diff --git a/code/modules/client/preference/preferences_toggles.dm b/code/modules/client/preference/preferences_toggles.dm index 5534e18e253..0f4317e3ce2 100644 --- a/code/modules/client/preference/preferences_toggles.dm +++ b/code/modules/client/preference/preferences_toggles.dm @@ -30,7 +30,8 @@ set name = "Show/Hide RadioChatter" set category = "Preferences" set desc = "Toggle seeing radiochatter from radios and speakers" - if(!holder) return + if(!check_rights(R_ADMIN)) + return prefs.toggles ^= CHAT_RADIO prefs.save_preferences(src) to_chat(usr, "You will [(prefs.toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from radios or speakers") @@ -49,7 +50,8 @@ set name = "Hear/Silence Admin Bwoinks" set category = "Preferences" set desc = "Toggle hearing a notification when admin PMs are recieved" - if(!holder) return + if(!check_rights(R_ADMIN)) + return prefs.sound ^= SOUND_ADMINHELP prefs.save_preferences(src) to_chat(usr, "You will [(prefs.sound & SOUND_ADMINHELP) ? "now" : "no longer"] hear a sound when adminhelps arrive.") @@ -59,7 +61,7 @@ set name = "Hear/Silence Mentorhelp Bwoinks" set category = "Preferences" set desc = "Toggle hearing a notification when mentorhelps are recieved" - if(!holder) + if(!check_rights(R_ADMIN|R_MENTOR)) return prefs.sound ^= SOUND_MENTORHELP prefs.save_preferences(src) @@ -296,7 +298,7 @@ to_chat(src, "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTPDA) ? "see all PDA messages" : "no longer see PDA messages"].") prefs.save_preferences(src) feedback_add_details("admin_verb","TGP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - + /client/verb/silence_current_midi() set name = "Silence Current Midi" set category = "Preferences" diff --git a/code/modules/events/event_procs.dm b/code/modules/events/event_procs.dm index c5b7c893c26..cc00f05723f 100644 --- a/code/modules/events/event_procs.dm +++ b/code/modules/events/event_procs.dm @@ -1,9 +1,9 @@ /client/proc/forceEvent(var/type in SSevents.allEvents) - set name = "Trigger Event (Debug Only)" + set name = "Trigger Event" set category = "Debug" - if(!holder) + if(!check_rights(R_EVENT)) return if(ispath(type)) diff --git a/code/modules/library/admin.dm b/code/modules/library/admin.dm index db907fc20ba..b56aa6994cf 100644 --- a/code/modules/library/admin.dm +++ b/code/modules/library/admin.dm @@ -3,8 +3,7 @@ set desc = "Permamently deletes a book from the database." set category = "Admin" - if(!holder) - to_chat(src, "Only administrators may use this command.") + if(!check_rights(R_ADMIN)) return var/isbn = input("ISBN number?", "Delete Book") as num | null @@ -25,8 +24,7 @@ set desc = "View books flagged for content." set category = "Admin" - if(!holder) - to_chat(src, "Only administrators may use this command.") + if(!check_rights(R_ADMIN)) return holder.view_flagged_books() diff --git a/paradise.dme b/paradise.dme index ffe88705d37..2e345de8bbb 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1204,7 +1204,6 @@ #include "code\modules\admin\verbs\adminjump.dm" #include "code\modules\admin\verbs\adminpm.dm" #include "code\modules\admin\verbs\adminsay.dm" -#include "code\modules\admin\verbs\alt_check.dm" #include "code\modules\admin\verbs\antag-ooc.dm" #include "code\modules\admin\verbs\atmosdebug.dm" #include "code\modules\admin\verbs\BrokenInhands.dm" @@ -1233,7 +1232,6 @@ #include "code\modules\admin\verbs\randomverbs.dm" #include "code\modules\admin\verbs\serialization.dm" #include "code\modules\admin\verbs\space_transitions.dm" -#include "code\modules\admin\verbs\spawnfloorcluwne.dm" #include "code\modules\admin\verbs\striketeam.dm" #include "code\modules\admin\verbs\striketeam_syndicate.dm" #include "code\modules\admin\verbs\ticklag.dm"