diff --git a/code/_helpers/logging.dm b/code/_helpers/logging.dm index 18cede2ea4..923b8f450f 100644 --- a/code/_helpers/logging.dm +++ b/code/_helpers/logging.dm @@ -49,7 +49,7 @@ for(var/client/C in admins) if(C.is_preference_enabled(/datum/client_preference/debug/show_debug_logs)) - to_chat(C, "DEBUG: [text]") + to_chat(C, "DEBUG: [text]") /proc/log_game(text) if (config.log_game) diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index fc1a8e05ca..48eb275a9e 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -83,7 +83,7 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = var/sql = "INSERT INTO erro_ban (`id`,`bantime`,`serverip`,`bantype`,`reason`,`job`,`duration`,`rounds`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`,`edits`,`unbanned`,`unbanned_datetime`,`unbanned_ckey`,`unbanned_computerid`,`unbanned_ip`) VALUES (null, Now(), '[serverip]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], [(rounds)?"[rounds]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', '[ip]', '[a_ckey]', '[a_computerid]', '[a_ip]', '[who]', '[adminwho]', '', null, null, null, null, null)" var/DBQuery/query_insert = dbcon.NewQuery(sql) query_insert.Execute() - to_chat(usr, "Ban saved to database.") + to_chat(usr, "Ban saved to database.") message_admins("[key_name_admin(usr)] has added a [bantype_str] for [ckey] [(job)?"([job])":""] [(duration > 0)?"([duration] minutes)":""] with the reason: \"[reason]\" to the ban database.",1) @@ -137,17 +137,17 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "") ban_number++; if(ban_number == 0) - to_chat(usr, "Database update failed due to no bans fitting the search criteria. If this is not a legacy ban you should contact the database admin.") + to_chat(usr, "Database update failed due to no bans fitting the search criteria. If this is not a legacy ban you should contact the database admin.") return if(ban_number > 1) - to_chat(usr, "Database update failed due to multiple bans fitting the search criteria. Note down the ckey, job and current time and contact the database admin.") + to_chat(usr, "Database update failed due to multiple bans fitting the search criteria. Note down the ckey, job and current time and contact the database admin.") return if(istext(ban_id)) ban_id = text2num(ban_id) if(!isnum(ban_id)) - to_chat(usr, "Database update failed due to a ban ID mismatch. Contact the database admin.") + to_chat(usr, "Database update failed due to a ban ID mismatch. Contact the database admin.") return DB_ban_unban_by_id(ban_id) @@ -173,7 +173,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null) duration = query.item[2] reason = query.item[3] else - to_chat(usr, "Invalid ban id. Contact the database admin") + to_chat(usr, "Invalid ban id. Contact the database admin") return reason = sql_sanitize_text(reason) @@ -205,12 +205,8 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null) if(alert("Unban [pckey]?", "Unban?", "Yes", "No") == "Yes") DB_ban_unban_by_id(banid) return - else - to_chat(usr, "Cancelled") - return - else - to_chat(usr, "Cancelled") - return + to_chat(usr, "Cancelled") + return datum/admins/proc/DB_ban_unban_by_id(var/id) @@ -232,11 +228,11 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) ban_number++; if(ban_number == 0) - to_chat(usr, "Database update failed due to a ban id not being present in the database.") + to_chat(usr, "Database update failed due to a ban id not being present in the database.") return if(ban_number > 1) - to_chat(usr, "Database update failed due to multiple bans having the same ID. Contact the database admin.") + to_chat(usr, "Database update failed due to multiple bans having the same ID. Contact the database admin.") return if(!src.owner || !istype(src.owner, /client)) @@ -272,7 +268,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) establish_db_connection() if(!dbcon.IsConnected()) - to_chat(usr, "Failed to establish database connection") + to_chat(usr, "Failed to establish database connection") return var/output = "
" diff --git a/code/modules/admin/NewBan.dm b/code/modules/admin/NewBan.dm index 944cdc552a..15d29eb1f0 100644 --- a/code/modules/admin/NewBan.dm +++ b/code/modules/admin/NewBan.dm @@ -106,7 +106,7 @@ var/savefile/Banlist Banlist.cd = "/base" if ( Banlist.dir.Find("[ckey][computerid]") ) - to_chat(usr, "Ban already exists.") + to_chat(usr, "Ban already exists.") return 0 else Banlist.dir.Add("[ckey][computerid]") diff --git a/code/modules/admin/ToRban.dm b/code/modules/admin/ToRban.dm index 1e2d5ef49c..dbf373b3ff 100644 --- a/code/modules/admin/ToRban.dm +++ b/code/modules/admin/ToRban.dm @@ -38,7 +38,7 @@ F["last_update"] << world.realtime log_misc("ToR data updated!") if(usr) - to_chat(usr, "ToRban updated.") + to_chat(usr, "ToRban updated.") return 1 log_misc("ToR data update aborted: no data.") return 0 @@ -73,16 +73,16 @@ var/choice = input(src,"Please select an IP address to remove from the ToR banlist:","Remove ToR ban",null) as null|anything in F.dir if(choice) F.dir.Remove(choice) - to_chat(src, "Address removed") + to_chat(src, "Address removed") if("remove all") - to_chat(src, "[TORFILE] was [fdel(TORFILE)?"":"not "]removed.") + to_chat(src, "[TORFILE] was [fdel(TORFILE)?"":"not "]removed.") if("find") var/input = input(src,"Please input an IP address to search for:","Find ToR ban",null) as null|text if(input) if(ToRban_isbanned(input)) - to_chat(src, "Address is a known ToR address") + to_chat(src, "Address is a known ToR address") else - to_chat(src, "Address is not a known ToR address") + to_chat(src, "Address is not a known ToR address") return #undef TORFILE diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 6fc26c7d48..a122f576a5 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -5,7 +5,7 @@ var/global/floorIsLava = 0 //////////////////////////////// /proc/message_admins(var/msg) - msg = "ADMIN LOG: [msg]" + msg = "ADMIN LOG: [msg]" //log_adminwarn(msg) //log_and_message_admins is for this for(var/client/C in admins) @@ -13,7 +13,7 @@ var/global/floorIsLava = 0 to_chat(C,msg) /proc/msg_admin_attack(var/text) //Toggleable Attack Messages - var/rendered = "ATTACK: [text]" + var/rendered = "ATTACK: [text]" for(var/client/C in admins) if((R_ADMIN|R_MOD) & C.holder.rights) if(C.is_preference_enabled(/datum/client_preference/mod/show_attack_logs)) diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index 8dc1e9de74..1342fc2f5f 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -23,7 +23,7 @@ if(!message) return var/F = investigate_subject2file(subject) if(!F) return - to_chat(F, "[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z]) || [src] [message]
") + to_chat(F, "[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z]) || [src] [message]
") //ADMINVERBS /client/proc/investigate_show( subject in list("hrefs","notes","singulo","telesci") ) @@ -34,7 +34,7 @@ if("singulo", "telesci") //general one-round-only stuff var/F = investigate_subject2file(subject) if(!F) - to_chat(src, "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.") + to_chat(src, "Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.") return src << browse(F,"window=investigate[subject];size=800x300") @@ -43,8 +43,8 @@ if(href_logfile) src << browse(href_logfile,"window=investigate[subject];size=800x300") else - to_chat(src, "Error: admin_investigate: No href logfile found.") + to_chat(src, "Error: admin_investigate: No href logfile found.") return else - to_chat(src, "Error: admin_investigate: Href Logging is not on.") + to_chat(src, "Error: admin_investigate: Href Logging is not on.") return diff --git a/code/modules/admin/admin_memo.dm b/code/modules/admin/admin_memo.dm index 007ca49ba5..fc38dda9d5 100644 --- a/code/modules/admin/admin_memo.dm +++ b/code/modules/admin/admin_memo.dm @@ -22,11 +22,11 @@ return if("") F.dir.Remove(ckey) - to_chat(src, "Memo removed") + to_chat(src, "Memo removed") return if( findtext(memo,"[memo]") + to_chat(F[ckey], "[key] on [time2text(world.realtime,"(DDD) DD MMM hh:mm")]
[memo]
") message_admins("[key] set an admin memo:
[memo]") //show all memos @@ -35,7 +35,7 @@ var/savefile/F = new(MEMOFILE) if(F) for(var/ckey in F.dir) - to_chat(src, "
Admin Memo by [F[ckey]]
") + to_chat(src, "
Admin Memo by [F[ckey]]
") //delete your own or somebody else's memo /client/proc/admin_memo_delete() @@ -48,7 +48,7 @@ ckey = src.ckey if(ckey) F.dir.Remove(ckey) - to_chat(src, "Removed Memo created by [ckey].") + to_chat(src, "Removed Memo created by [ckey].") #undef MEMOFILE #undef ENABLE_MEMOS \ No newline at end of file diff --git a/code/modules/admin/admin_verb_lists.dm b/code/modules/admin/admin_verb_lists.dm new file mode 100644 index 0000000000..04092ddd3f --- /dev/null +++ b/code/modules/admin/admin_verb_lists.dm @@ -0,0 +1,528 @@ +//admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless +var/list/admin_verbs_default = list( + /datum/admins/proc/show_player_panel, //shows an interface for individual players, with various links (links require additional flags, + /client/proc/player_panel_new, //shows an interface for all players, with links to various panels, + /client/proc/player_panel, + /client/proc/deadmin_self, //destroys our own admin datum so we can play as a regular player, + /client/proc/hide_verbs, //hides all our adminverbs, + /client/proc/hide_most_verbs, //hides all our hideable adminverbs, + /client/proc/debug_variables, //allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify, + /client/proc/mark_datum_mapview, + /client/proc/cmd_check_new_players, //allows us to see every new player +// /client/proc/check_antagonists, //shows all antags, +// /client/proc/cmd_mod_say, +// /client/proc/deadchat //toggles deadchat on/off, +// /client/proc/toggle_ahelp_sound, + ) + +var/list/admin_verbs_admin = list( + /datum/admins/proc/set_tcrystals, + /datum/admins/proc/add_tcrystals, + /client/proc/invisimin, //allows our mob to go invisible/visible, + /datum/admins/proc/show_traitor_panel, //interface which shows a mob's mind., + /datum/admins/proc/show_game_mode, //Configuration window for the current game mode., + /datum/admins/proc/force_mode_latespawn, //Force the mode to try a latespawn proc, + /datum/admins/proc/force_antag_latespawn, //Force a specific template to try a latespawn proc, + /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., + /datum/admins/proc/intercom, //send a fake intercom message, like an arrivals announcement, + /datum/admins/proc/intercom_convo, //send a fake intercom conversation, like an ATC exchange, + /client/proc/colorooc, //allows us to set a custom colour for everythign we say in ooc, + /client/proc/admin_ghost, //allows us to ghost/reenter body at will, + /client/proc/toggle_view_range, //changes how far we can see, + /datum/admins/proc/view_txt_log, //shows the server log (diary) for today, + /datum/admins/proc/view_atk_log, //shows the server combat-log, doesn't do anything presently, + /client/proc/cmd_admin_pm_context, //right-click adminPM interface, + /client/proc/cmd_admin_pm_panel, //admin-pm list, + /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_check_player_logs, //checks a player's attack logs, + /client/proc/cmd_admin_check_dialogue_logs, //checks a player's dialogue logs, + /datum/admins/proc/access_news_network, //allows access of newscasters, + /client/proc/giveruntimelog, //allows us to give access to runtime logs to somebody, + /client/proc/getserverlog, //allows us to fetch server logs (diary) for other days, + /client/proc/jumptocoord, //we ghost and jump to a coordinate, + /client/proc/Getmob, //teleports a mob to our location, + /client/proc/Getkey, //teleports a mob with a certain ckey to our location, +// /client/proc/sendmob, //sends a mob somewhere, -Removed due to it needing two sorting procs to work, which were executed every time an admin right-clicked. ~Errorage, + /client/proc/Jump, + /client/proc/jumptokey, //allows us to jump to the location of a mob with a certain ckey, + /client/proc/jumptomob, //allows us to jump to a specific mob, + /client/proc/jumptoturf, //allows us to jump to a specific turf, + /client/proc/admin_call_shuttle, //allows us to call the emergency shuttle, + /client/proc/admin_cancel_shuttle, //allows us to cancel the emergency shuttle, sending it back to CentCom, + /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/cmd_admin_create_centcom_report, + /client/proc/check_words, //displays cult-words, + /client/proc/check_ai_laws, //shows AI and borg laws, + /client/proc/rename_silicon, //properly renames silicons, + /client/proc/manage_silicon_laws, // Allows viewing and editing silicon laws. , + /client/proc/check_antagonists, + /client/proc/admin_memo, //admin memo system. show/delete/write. +SERVER needed to delete admin memos of others, + /client/proc/dsay, //talk in deadchat using our ckey/fakekey, +// /client/proc/toggle_hear_deadcast, //toggles whether we hear deadchat, + /client/proc/investigate_show, //various admintools for investigation. Such as a singulo grief-log, + /client/proc/secrets, + /datum/admins/proc/toggleooc, //toggles ooc on/off for everyone, + /datum/admins/proc/togglelooc, //toggles looc on/off for everyone, + /datum/admins/proc/toggleoocdead, //toggles ooc on/off for everyone who is dead, + /datum/admins/proc/togglehubvisibility, //toggles visibility on the BYOND Hub., + /datum/admins/proc/toggledsay, //toggles dsay on/off for everyone, + /client/proc/game_panel, //game panel, allows to change game-mode etc, + /client/proc/cmd_admin_say, //admin-only ooc chat, + /client/proc/cmd_mod_say, + /client/proc/cmd_event_say, + /datum/admins/proc/PlayerNotes, + /datum/admins/proc/show_player_info, + /client/proc/free_slot, //frees slot for chosen job, + /client/proc/cmd_admin_change_custom_event, + /client/proc/cmd_admin_rejuvenate, + /client/proc/toggleghostwriters, + /client/proc/toggledrones, + /datum/admins/proc/show_skills, + /client/proc/check_customitem_activity, + /client/proc/man_up, + /client/proc/global_man_up, + /client/proc/response_team, // Response Teams admin verb, + /client/proc/trader_ship, // Trader ship admin verb, + /client/proc/toggle_antagHUD_use, + /client/proc/toggle_antagHUD_restrictions, + /client/proc/allow_character_respawn, // Allows a ghost to respawn , + /client/proc/event_manager_panel, + /client/proc/empty_ai_core_toggle_latejoin, + /client/proc/empty_ai_core_toggle_latejoin, + /client/proc/aooc, + /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 change its basic appearance , + /client/proc/change_security_level, + /client/proc/view_chemical_reaction_logs, + /client/proc/makePAI, + /client/proc/toggle_debug_logs, + /client/proc/toggle_attack_logs, + /datum/admins/proc/paralyze_mob, + /client/proc/fixatmos, + /datum/admins/proc/sendFax, + /client/proc/despawn_player, + /datum/admins/proc/view_feedback + ) + +var/list/admin_verbs_ban = list( + /client/proc/unban_panel, + /client/proc/jobbans + ) + +var/list/admin_verbs_sounds = list( + /client/proc/play_local_sound, + /client/proc/play_sound, + /client/proc/play_server_sound + ) + +var/list/admin_verbs_fun = list( + /client/proc/object_talk, + /datum/admins/proc/cmd_admin_dress, + /client/proc/cmd_admin_gib_self, + /client/proc/drop_bomb, + /client/proc/everyone_random, + /client/proc/cinematic, + /datum/admins/proc/toggle_aliens, + /datum/admins/proc/toggle_space_ninja, + /client/proc/cmd_admin_add_freeform_ai_law, + /client/proc/cmd_admin_add_random_ai_law, + /client/proc/make_sound, + /client/proc/toggle_random_events, + /client/proc/editappear, + /client/proc/roll_dices, + /datum/admins/proc/call_supply_drop, + /datum/admins/proc/call_drop_pod, + /client/proc/smite, + /client/proc/admin_lightning_strike, + ) + +var/list/admin_verbs_spawn = list( + /datum/admins/proc/spawn_fruit, + /datum/admins/proc/spawn_custom_item, + /datum/admins/proc/check_custom_items, + /datum/admins/proc/spawn_plant, + /datum/admins/proc/spawn_atom, //allows us to spawn instances, + /client/proc/respawn_character, + /client/proc/virus2_editor, + /client/proc/spawn_chemdisp_cartridge, + /client/proc/map_template_load, + /client/proc/map_template_upload, + /client/proc/map_template_load_on_new_z + ) + +var/list/admin_verbs_server = list( + /datum/admins/proc/capture_map, + /client/proc/Set_Holiday, + /client/proc/ToRban, + /datum/admins/proc/startnow, + /datum/admins/proc/restart, + /datum/admins/proc/delay, + /datum/admins/proc/toggleaban, + /client/proc/cmd_mod_say, + /client/proc/toggle_log_hrefs, + /datum/admins/proc/immreboot, + /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, + /datum/admins/proc/adrev, + /datum/admins/proc/adspawn, + /datum/admins/proc/adjump, + /datum/admins/proc/toggle_aliens, + /datum/admins/proc/toggle_space_ninja, + /client/proc/toggle_random_events, + /client/proc/check_customitem_activity, + /client/proc/nanomapgen_DumpImage, + /client/proc/modify_server_news, + /client/proc/recipe_dump, + /client/proc/panicbunker, + /client/proc/paranoia_logging, + /client/proc/ip_reputation + ) + +var/list/admin_verbs_debug = list( + /client/proc/getruntimelog, //allows us to access runtime logs to somebody, + /client/proc/cmd_admin_list_open_jobs, + /client/proc/Debug2, + /client/proc/kill_air, + /client/proc/ZASSettings, + /client/proc/cmd_debug_make_powernets, + /client/proc/kill_airgroup, + /client/proc/debug_controller, + /client/proc/debug_antagonist_template, + /client/proc/cmd_debug_mob_lists, + /client/proc/cmd_debug_using_map, + /client/proc/cmd_admin_delete, + /client/proc/cmd_debug_del_all, + /client/proc/cmd_debug_tog_aliens, + /client/proc/cmd_display_del_log, + /client/proc/cmd_display_init_log, + /client/proc/cmd_display_overlay_log, + /client/proc/air_report, + /client/proc/reload_admins, + /client/proc/reload_eventMs, + /client/proc/restart_controller, + /datum/admins/proc/restart, + /client/proc/print_random_map, + /client/proc/create_random_map, + /client/proc/apply_random_map, + /client/proc/overlay_random_map, + /client/proc/delete_random_map, + /client/proc/show_plant_genes, + /client/proc/enable_debug_verbs, + /client/proc/callproc, + /client/proc/callproc_datum, + /client/proc/SDQL2_query, + /client/proc/Jump, + /client/proc/jumptomob, + /client/proc/jumptocoord, + /client/proc/dsay, + /client/proc/toggle_debug_logs, + /client/proc/admin_ghost, //allows us to ghost/reenter body at will, + /datum/admins/proc/view_runtimes, + /client/proc/show_gm_status, + /datum/admins/proc/change_weather, + /datum/admins/proc/change_time, + /client/proc/admin_give_modifier, + /client/proc/simple_DPS, + /datum/admins/proc/view_feedback + ) + +var/list/admin_verbs_paranoid_debug = list( + /client/proc/callproc, + /client/proc/callproc_datum, + /client/proc/debug_controller + ) + +var/list/admin_verbs_possess = list( + /proc/possess, + /proc/release + ) +var/list/admin_verbs_permissions = list( + /client/proc/edit_admin_permissions + ) +var/list/admin_verbs_rejuv = list( + /client/proc/respawn_character + ) + +//verbs which can be hidden - needs work +var/list/admin_verbs_hideable = list( + /client/proc/deadmin_self, +// /client/proc/deadchat, + /datum/admins/proc/show_traitor_panel, + /datum/admins/proc/toggleenter, + /datum/admins/proc/toggleguests, + /datum/admins/proc/announce, + /client/proc/colorooc, + /client/proc/admin_ghost, + /client/proc/toggle_view_range, + /datum/admins/proc/view_txt_log, + /datum/admins/proc/view_atk_log, + /client/proc/cmd_admin_subtle_message, + /client/proc/cmd_admin_check_contents, + /client/proc/cmd_admin_check_player_logs, + /client/proc/cmd_admin_check_dialogue_logs, + /datum/admins/proc/access_news_network, + /client/proc/admin_call_shuttle, + /client/proc/admin_cancel_shuttle, + /client/proc/cmd_admin_direct_narrate, + /client/proc/cmd_admin_world_narrate, + /client/proc/check_words, + /client/proc/play_local_sound, + /client/proc/play_sound, + /client/proc/play_server_sound, + /client/proc/object_talk, + /datum/admins/proc/cmd_admin_dress, + /client/proc/cmd_admin_gib_self, + /client/proc/drop_bomb, + /client/proc/cinematic, + /datum/admins/proc/toggle_aliens, + /datum/admins/proc/toggle_space_ninja, + /client/proc/cmd_admin_add_freeform_ai_law, + /client/proc/cmd_admin_add_random_ai_law, + /client/proc/cmd_admin_create_centcom_report, + /client/proc/make_sound, + /client/proc/toggle_random_events, + /client/proc/cmd_admin_add_random_ai_law, + /client/proc/Set_Holiday, + /client/proc/ToRban, + /datum/admins/proc/startnow, + /datum/admins/proc/restart, + /datum/admins/proc/delay, + /datum/admins/proc/toggleaban, + /client/proc/toggle_log_hrefs, + /datum/admins/proc/immreboot, + /client/proc/everyone_random, + /datum/admins/proc/toggleAI, + /datum/admins/proc/adrev, + /datum/admins/proc/adspawn, + /datum/admins/proc/adjump, + /client/proc/restart_controller, + /client/proc/cmd_admin_list_open_jobs, + /client/proc/callproc, + /client/proc/callproc_datum, + /client/proc/Debug2, + /client/proc/reload_admins, + /client/proc/kill_air, + /client/proc/cmd_debug_make_powernets, + /client/proc/kill_airgroup, + /client/proc/debug_controller, + /client/proc/startSinglo, + /client/proc/simple_DPS, + /client/proc/cmd_debug_mob_lists, + /client/proc/cmd_debug_using_map, + /client/proc/cmd_debug_del_all, + /client/proc/cmd_debug_tog_aliens, + /client/proc/cmd_display_del_log, + /client/proc/air_report, + /client/proc/enable_debug_verbs, + /client/proc/roll_dices, + /proc/possess, + /proc/release, + /datum/admins/proc/set_tcrystals + ) +var/list/admin_verbs_mod = list( + /client/proc/cmd_admin_pm_context, //right-click adminPM interface, + /client/proc/cmd_admin_pm_panel, //admin-pm list, + /client/proc/debug_variables, //allows us to -see- the variables of any instance in the game., + /datum/admins/proc/PlayerNotes, + /client/proc/admin_ghost, //allows us to ghost/reenter body at will, + /client/proc/cmd_mod_say, + /client/proc/cmd_event_say, + /datum/admins/proc/show_player_info, + /datum/admins/proc/show_traitor_panel, + /client/proc/colorooc, + /client/proc/player_panel_new, + /client/proc/dsay, + /datum/admins/proc/show_skills, + /datum/admins/proc/show_player_panel, + /client/proc/check_antagonists, + /client/proc/aooc, + /client/proc/jobbans, + /client/proc/toggle_attack_logs, + /client/proc/cmd_admin_subtle_message, //send an message to somebody as a 'voice in their head', + /datum/admins/proc/paralyze_mob, + /client/proc/cmd_admin_direct_narrate, + /client/proc/allow_character_respawn, // Allows a ghost to respawn , + /datum/admins/proc/sendFax, + /client/proc/getserverlog, //allows us to fetch server logs (diary) for other days, + /datum/admins/proc/view_txt_log, //shows the server log (diary) for today, + /datum/admins/proc/view_atk_log //shows the server combat-log, doesn't do anything presently, +) + +var/list/admin_verbs_event_manager = list( + /client/proc/cmd_event_say, + /client/proc/cmd_admin_pm_context, + /client/proc/cmd_admin_pm_panel, + /client/proc/admin_ghost, + /datum/admins/proc/show_player_info, + /client/proc/dsay, + /client/proc/cmd_admin_subtle_message, + /client/proc/debug_variables, + /client/proc/check_antagonists, + /client/proc/aooc, + /datum/admins/proc/paralyze_mob, + /client/proc/cmd_admin_direct_narrate, + /client/proc/allow_character_respawn, + /datum/admins/proc/sendFax, + /client/proc/respawn_character, + /proc/possess, + /proc/release, + /datum/admins/proc/change_weather, + /datum/admins/proc/change_time, + /client/proc/admin_give_modifier, + /client/proc/Jump, + /client/proc/jumptomob, + /client/proc/jumptocoord, + /client/proc/cmd_admin_delete, + /datum/admins/proc/delay, + /client/proc/Set_Holiday, + /client/proc/make_sound, + /client/proc/toggle_random_events, + /datum/admins/proc/cmd_admin_dress, + /client/proc/cmd_admin_gib_self, + /client/proc/drop_bomb, + /client/proc/cmd_admin_add_freeform_ai_law, + /client/proc/cmd_admin_add_random_ai_law, + /client/proc/make_sound, + /client/proc/toggle_random_events, + /client/proc/editappear, + /client/proc/roll_dices, + /datum/admins/proc/call_supply_drop, + /datum/admins/proc/call_drop_pod, + /datum/admins/proc/PlayerNotes, + /client/proc/callproc, + /client/proc/callproc_datum, + /client/proc/debug_controller, + /client/proc/show_gm_status, + /datum/admins/proc/change_weather, + /datum/admins/proc/change_time, + /client/proc/admin_give_modifier, + /datum/admins/proc/cmd_admin_dress, + /client/proc/cmd_admin_gib_self, + /datum/admins/proc/set_tcrystals, + /datum/admins/proc/add_tcrystals, + /client/proc/invisimin, //allows our mob to go invisible/visible, + /datum/admins/proc/show_traitor_panel, //interface which shows a mob's mind., + /datum/admins/proc/show_game_mode, //Configuration window for the current game mode., + /datum/admins/proc/force_mode_latespawn, //Force the mode to try a latespawn proc, + /datum/admins/proc/force_antag_latespawn, //Force a specific template to try a latespawn proc, + /datum/admins/proc/announce, //priority announce something to all clients., + /datum/admins/proc/intercom, //send a fake intercom message, like an arrivals announcement, + /datum/admins/proc/intercom_convo, //send a fake intercom conversation, like an ATC exchange, + /client/proc/colorooc, //allows us to set a custom colour for everythign we say in ooc, + /client/proc/admin_ghost, //allows us to ghost/reenter body at will, + /client/proc/toggle_view_range, //changes how far we can see, + /client/proc/cmd_admin_pm_context, //right-click adminPM interface, + /client/proc/cmd_admin_pm_panel, //admin-pm list, + /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_check_player_logs, //checks a player's attack logs, + /client/proc/cmd_admin_check_dialogue_logs, //checks a player's dialogue logs, + /datum/admins/proc/access_news_network, //allows access of newscasters, + /client/proc/jumptocoord, //we ghost and jump to a coordinate, + /client/proc/Getmob, //teleports a mob to our location, + /client/proc/Getkey, //teleports a mob with a certain ckey to our location, + /client/proc/Jump, + /client/proc/jumptokey, //allows us to jump to the location of a mob with a certain ckey, + /client/proc/jumptomob, //allows us to jump to a specific mob, + /client/proc/jumptoturf, //allows us to jump to a specific turf, + /client/proc/admin_call_shuttle, //allows us to call the emergency shuttle, + /client/proc/admin_cancel_shuttle, //allows us to cancel the emergency shuttle, sending it back to CentCom, + /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/cmd_admin_create_centcom_report, + /client/proc/check_words, //displays cult-words, + /client/proc/check_ai_laws, //shows AI and borg laws, + /client/proc/rename_silicon, //properly renames silicons, + /client/proc/manage_silicon_laws, // Allows viewing and editing silicon laws. , + /client/proc/check_antagonists, + /client/proc/admin_memo, //admin memo system. show/delete/write. +SERVER needed to delete admin memos of others, + /client/proc/dsay, //talk in deadchat using our ckey/fakekey, + /client/proc/secrets, + /client/proc/game_panel, //game panel, allows to change game-mode etc, + /client/proc/cmd_mod_say, + /client/proc/cmd_event_say, + /datum/admins/proc/show_player_info, + /client/proc/free_slot, //frees slot for chosen job, + /client/proc/cmd_admin_change_custom_event, + /client/proc/cmd_admin_rejuvenate, + /client/proc/toggleghostwriters, + /datum/admins/proc/show_skills, + /client/proc/man_up, + /client/proc/global_man_up, + /client/proc/response_team, // Response Teams admin verb, + /client/proc/trader_ship, // Trader ship admin verb, + /client/proc/allow_character_respawn, // Allows a ghost to respawn , + /client/proc/event_manager_panel, + /client/proc/aooc, + /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 change its basic appearance , + /client/proc/change_security_level, + /client/proc/makePAI, + /client/proc/toggle_debug_logs, + /client/proc/toggle_attack_logs, + /datum/admins/proc/paralyze_mob, + /client/proc/fixatmos, + /datum/admins/proc/sendFax, + /client/proc/despawn_player, + /datum/admins/proc/view_feedback, + /datum/admins/proc/capture_map, + /client/proc/Set_Holiday, + /datum/admins/proc/startnow, + /datum/admins/proc/restart, + /datum/admins/proc/delay, + /client/proc/cmd_mod_say, + /datum/admins/proc/immreboot, + /client/proc/everyone_random, + /client/proc/cmd_admin_delete, //delete an instance/object/mob/etc, + /client/proc/cmd_debug_del_all, + /client/proc/toggle_random_events, + /client/proc/modify_server_news + +) + +/client/proc/add_admin_verbs() + if(holder) + verbs += admin_verbs_default + if(holder.rights & R_BUILDMODE) verbs += /client/proc/togglebuildmodeself + if(holder.rights & R_ADMIN) verbs += admin_verbs_admin + if(holder.rights & R_BAN) verbs += admin_verbs_ban + if(holder.rights & R_FUN) verbs += admin_verbs_fun + if(holder.rights & R_SERVER) verbs += admin_verbs_server + if(holder.rights & R_DEBUG) + verbs += admin_verbs_debug + if(config.debugparanoid && !(holder.rights & R_ADMIN)) + verbs.Remove(admin_verbs_paranoid_debug) //Right now it's just callproc but we can easily add others later on. + if(holder.rights & R_POSSESS) verbs += admin_verbs_possess + if(holder.rights & R_PERMISSIONS) verbs += admin_verbs_permissions + if(holder.rights & R_STEALTH) verbs += /client/proc/stealth + if(holder.rights & R_REJUVINATE) verbs += admin_verbs_rejuv + if(holder.rights & R_SOUNDS) verbs += admin_verbs_sounds + if(holder.rights & R_SPAWN) verbs += admin_verbs_spawn + if(holder.rights & R_MOD) verbs += admin_verbs_mod + if(holder.rights & R_EVENT) verbs += admin_verbs_event_manager + +/client/proc/remove_admin_verbs() + verbs.Remove( + admin_verbs_default, + /client/proc/togglebuildmodeself, + admin_verbs_admin, + admin_verbs_ban, + admin_verbs_fun, + admin_verbs_server, + admin_verbs_debug, + admin_verbs_possess, + admin_verbs_permissions, + /client/proc/stealth, + admin_verbs_rejuv, + admin_verbs_sounds, + admin_verbs_spawn, + debug_verbs + ) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 5e37b5f6a6..f7de0c38e0 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD //admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless var/list/admin_verbs_default = list( /datum/admins/proc/show_player_panel, //shows an interface for individual players, with various links (links require additional flags, @@ -531,6 +532,8 @@ var/list/admin_verbs_event_manager = list( debug_verbs ) +======= +>>>>>>> 1ed5556... Adds empty filter classes to send messages to particular vchat filters. (#6998) /client/proc/hide_most_verbs()//Allows you to keep some functionality while hiding some verbs set name = "Adminverbs - Hide Most" set category = "Admin" @@ -538,7 +541,7 @@ var/list/admin_verbs_event_manager = list( verbs.Remove(/client/proc/hide_most_verbs, admin_verbs_hideable) verbs += /client/proc/show_verbs - to_chat(src, "Most of your adminverbs have been hidden.") + to_chat(src, "Most of your adminverbs have been hidden.") feedback_add_details("admin_verb","HMV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return @@ -549,7 +552,7 @@ var/list/admin_verbs_event_manager = list( remove_admin_verbs() verbs += /client/proc/show_verbs - to_chat(src, "Almost all of your adminverbs have been hidden.") + to_chat(src, "Almost all of your adminverbs have been hidden.") feedback_add_details("admin_verb","TAVVH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return @@ -560,7 +563,7 @@ var/list/admin_verbs_event_manager = list( verbs -= /client/proc/show_verbs add_admin_verbs() - to_chat(src, "All of your adminverbs are now visible.") + to_chat(src, "All of your adminverbs are now visible.") feedback_add_details("admin_verb","TAVVS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -574,13 +577,13 @@ var/list/admin_verbs_event_manager = list( if(ghost.can_reenter_corpse) ghost.reenter_corpse() else - to_chat(ghost, "Error: Aghost: Can't reenter corpse.") + to_chat(ghost, "Error: Aghost: Can't reenter corpse.") return feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! else if(istype(mob,/mob/new_player)) - to_chat(src, "Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.") + to_chat(src, "Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.") else //ghostize var/mob/body = mob @@ -599,11 +602,11 @@ var/list/admin_verbs_event_manager = list( if(holder && mob) if(mob.invisibility == INVISIBILITY_OBSERVER) mob.invisibility = initial(mob.invisibility) - to_chat(mob, "Invisimin off. Invisibility reset.") + to_chat(mob, "Invisimin off. Invisibility reset.") mob.alpha = max(mob.alpha + 100, 255) else mob.invisibility = INVISIBILITY_OBSERVER - to_chat(mob, "Invisimin on. You are now as invisible as a ghost.") + to_chat(mob, "Invisimin on. You are now as invisible as a ghost.") mob.alpha = max(mob.alpha - 100, 0) @@ -721,8 +724,7 @@ var/list/admin_verbs_event_manager = list( createStealthKey() if(istype(mob, /mob/new_player)) mob.name = new_key - log_admin("[key_name(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]") - message_admins("[key_name_admin(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]", 1) + log_and_message_admins("[key_name(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]") feedback_add_details("admin_verb","SM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! #define MAX_WARNS 3 @@ -733,7 +735,7 @@ var/list/admin_verbs_event_manager = list( if(!warned_ckey || !istext(warned_ckey)) return if(warned_ckey in admin_datums) - to_chat(usr, "Error: warn(): You can't warn admins.") + to_chat(usr, "Error: warn(): You can't warn admins.") return var/datum/preferences/D @@ -742,14 +744,14 @@ var/list/admin_verbs_event_manager = list( else D = preferences_datums[warned_ckey] if(!D) - to_chat(src, "Error: warn(): No such ckey found.") + to_chat(src, "Error: warn(): No such ckey found.") return if(++D.warns >= MAX_WARNS) //uh ohhhh...you'reee iiiiin trouuuubble O:) ban_unban_log_save("[ckey] warned [warned_ckey], resulting in a [AUTOBANTIME] minute autoban.") if(C) message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] resulting in a [AUTOBANTIME] minute ban.") - to_chat(C, "You have been autobanned due to a warning by [ckey].
This is a temporary ban, it will be removed in [AUTOBANTIME] minutes.
") + to_chat(C, "You have been autobanned due to a warning by [ckey].
This is a temporary ban, it will be removed in [AUTOBANTIME] minutes.
") del(C) else message_admins("[key_name_admin(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban.") @@ -757,7 +759,7 @@ var/list/admin_verbs_event_manager = list( feedback_inc("ban_warn",1) else if(C) - to_chat(C, "You have been formally warned by an administrator.
Further warnings will result in an autoban.
") + to_chat(C, "You have been formally warned by an administrator.
Further warnings will result in an autoban.
") message_admins("[key_name_admin(src)] has warned [key_name_admin(C)]. They have [MAX_WARNS-D.warns] strikes remaining.") else message_admins("[key_name_admin(src)] has warned [warned_ckey] (DC). They have [MAX_WARNS-D.warns] strikes remaining.") @@ -880,19 +882,15 @@ var/list/admin_verbs_event_manager = list( if(!msg) return for (var/mob/V in hearers(mob.control_object)) - V.show_message("[mob.control_object.name] says: \"" + msg + "\"", 2) + V.show_message("[mob.control_object.name] says: \"[msg]\"", 2) feedback_add_details("admin_verb","OT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/kill_air() // -- TLE set category = "Debug" set name = "Kill Air" set desc = "Toggle Air Processing" - if(!SSair.can_fire) - SSair.can_fire = TRUE - to_chat(usr, "Enabled air processing.") - else - SSair.can_fire = FALSE - to_chat(usr, "Disabled air processing.") + SSair.can_fire = !SSair.can_fire + to_chat(usr, "[SSair.can_fire ? "En" : "Dis"]abled air processing.") feedback_add_details("admin_verb","KA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] used 'kill air'.") message_admins("[key_name_admin(usr)] used 'kill air'.", 1) @@ -905,7 +903,7 @@ var/list/admin_verbs_event_manager = list( deadmin_holder.reassociate() log_admin("[src] re-admined themself.") message_admins("[src] re-admined themself.", 1) - to_chat(src, "You now have the keys to control the planet, or atleast a small space station") + to_chat(src, "You now have the keys to control the planet, or at least a small space station") verbs -= /client/proc/readmin_self /client/proc/deadmin_self() @@ -917,7 +915,7 @@ var/list/admin_verbs_event_manager = list( log_admin("[src] deadmined themself.") message_admins("[src] deadmined themself.", 1) deadmin() - to_chat(src, "You are now a normal player.") + to_chat(src, "You are now a normal player.") verbs |= /client/proc/readmin_self feedback_add_details("admin_verb","DAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! @@ -926,12 +924,8 @@ var/list/admin_verbs_event_manager = list( set category = "Server" if(!holder) return if(config) - if(config.log_hrefs) - config.log_hrefs = 0 - to_chat(src, "Stopped logging hrefs") - else - config.log_hrefs = 1 - to_chat(src, "Started logging hrefs") + config.log_hrefs = !config.log_hrefs + message_admins("[key_name_admin(usr)] [config.log_hrefs ? "started" : "stopped"] logging hrefs") /client/proc/check_ai_laws() set name = "Check AI Laws" @@ -993,7 +987,7 @@ var/list/admin_verbs_event_manager = list( if(!H) return if(!H.client) - to_chat(usr, "Only mobs with clients can alter their own appearance.") + to_chat(usr, " Only mobs with clients can alter their own appearance.") return var/datum/gender/T = gender_datums[H.get_visible_gender()] switch(alert("Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel")) @@ -1036,7 +1030,7 @@ var/list/admin_verbs_event_manager = list( var/mob/living/carbon/human/M = input("Select mob.", "Edit Appearance") as null|anything in human_mob_list if(!istype(M, /mob/living/carbon/human)) - to_chat(usr, "You can only do this to humans!") + to_chat(usr, "You can only do this to humans!") return switch(alert("Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.",,"Yes","No")) if("No") @@ -1124,28 +1118,16 @@ var/list/admin_verbs_event_manager = list( set category = "Server" if(!holder) return if(config) - if(config.cult_ghostwriter) - config.cult_ghostwriter = 0 - to_chat(src, "Disallowed ghost writers.") - message_admins("Admin [key_name_admin(usr)] has disabled ghost writers.", 1) - else - config.cult_ghostwriter = 1 - to_chat(src, "Enabled ghost writers.") - message_admins("Admin [key_name_admin(usr)] has enabled ghost writers.", 1) + config.cult_ghostwriter = !config.cult_ghostwriter + message_admins("Admin [key_name_admin(usr)] has [config.cult_ghostwriter ? "en" : "dis"]abled ghost writers.", 1) /client/proc/toggledrones() set name = "Toggle maintenance drones" set category = "Server" if(!holder) return if(config) - if(config.allow_drone_spawn) - config.allow_drone_spawn = 0 - to_chat(src, "Disallowed maint drones.") - message_admins("Admin [key_name_admin(usr)] has disabled maint drones.", 1) - else - config.allow_drone_spawn = 1 - to_chat(src, "Enabled maint drones.") - message_admins("Admin [key_name_admin(usr)] has enabled maint drones.", 1) + config.allow_drone_spawn = !config.allow_drone_spawn + message_admins("Admin [key_name_admin(usr)] has [config.allow_drone_spawn ? "en" : "dis"]abled maintenance drones.", 1) /client/proc/man_up(mob/T as mob in mob_list) set category = "Fun" @@ -1155,8 +1137,8 @@ var/list/admin_verbs_event_manager = list( if(alert("Are you sure you want to tell them to man up?","Confirmation","Deal with it","No")=="No") return - to_chat(T, "Man up and deal with it.") - to_chat(T, "Move along.") + to_chat(T, "Man up and deal with it.") + to_chat(T, "Move along.") log_admin("[key_name(usr)] told [key_name(T)] to man up and deal with it.") message_admins("[key_name_admin(usr)] told [key_name(T)] to man up and deal with it.", 1) @@ -1169,7 +1151,7 @@ var/list/admin_verbs_event_manager = list( if(alert("Are you sure you want to tell the whole server up?","Confirmation","Deal with it","No")=="No") return for (var/mob/T as mob in mob_list) - to_chat(T, "
Man up.
Deal with it.

Move along.

") + to_chat(T, "
Man up.
Deal with it.

Move along.

") T << 'sound/voice/ManUp1.ogg' log_admin("[key_name(usr)] told everyone to man up and deal with it.") diff --git a/code/modules/admin/callproc/callproc.dm b/code/modules/admin/callproc/callproc.dm index f72606d27b..bcadded2fb 100644 --- a/code/modules/admin/callproc/callproc.dm +++ b/code/modules/admin/callproc/callproc.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /client/proc/callproc() set category = "Debug" set name = "Advanced ProcCall" @@ -208,3 +209,215 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) else . = "[procname] returned: [!isnull(returnval) ? returnval : "null"]" +======= +/client/proc/callproc() + set category = "Debug" + set name = "Advanced ProcCall" + set waitfor = 0 + + if(!check_rights(R_DEBUG)) + return + + var/datum/target = null + var/targetselected = 0 + var/returnval = null + + switch(alert("Proc owned by something?",,"Yes","No")) + if("Yes") + targetselected = 1 + var/list/value = vv_get_value(default_class = VV_ATOM_REFERENCE, classes = list(VV_ATOM_REFERENCE, VV_DATUM_REFERENCE, VV_MOB_REFERENCE, VV_CLIENT)) + if (!value["class"] || !value["value"]) + return + target = value["value"] + if("No") + target = null + targetselected = 0 + + var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null + if(!procname) + return + + //hascall() doesn't support proc paths (eg: /proc/gib(), it only supports "gib") + var/testname = procname + if(targetselected) + //Find one of the 3 possible ways they could have written /proc/PROCNAME + if(findtext(procname, "/proc/")) + testname = replacetext(procname, "/proc/", "") + else if(findtext(procname, "/proc")) + testname = replacetext(procname, "/proc", "") + else if(findtext(procname, "proc/")) + testname = replacetext(procname, "proc/", "") + //Clear out any parenthesis if they're a dummy + testname = replacetext(testname, "()", "") + + if(targetselected && !hascall(target,testname)) + to_chat(usr, "Error: callproc(): type [target.type] has no proc named [procname].") + return + else + var/procpath = text2path(procname) + if (!procpath) + to_chat(usr, "Error: callproc(): proc [procname] does not exist. (Did you forget the /proc/ part?)") + return + var/list/lst = get_callproc_args() + if(!lst) + return + + if(targetselected) + if(!target) + to_chat(usr, "Error: callproc(): owner of proc no longer exists.") + return + var/msg = "[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]." + log_admin(msg) + //message_admins(msg) //Proccall announce removed. + admin_ticket_log(target, msg) + returnval = WrapAdminProcCall(target, procname, lst) // Pass the lst as an argument list to the proc + else + //this currently has no hascall protection. wasn't able to get it working. + log_admin("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].") + //message_admins("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].") //Proccall announce removed. + returnval = WrapAdminProcCall(GLOBAL_PROC, procname, lst) // Pass the lst as an argument list to the proc + . = get_callproc_returnval(returnval, procname) + if(.) + to_chat(usr, .) + feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +GLOBAL_VAR(AdminProcCaller) +GLOBAL_PROTECT(AdminProcCaller) +GLOBAL_VAR_INIT(AdminProcCallCount, 0) +GLOBAL_PROTECT(AdminProcCallCount) +GLOBAL_VAR(LastAdminCalledTargetRef) +GLOBAL_PROTECT(LastAdminCalledTargetRef) +GLOBAL_VAR(LastAdminCalledTarget) +GLOBAL_PROTECT(LastAdminCalledTarget) +GLOBAL_VAR(LastAdminCalledProc) +GLOBAL_PROTECT(LastAdminCalledProc) +GLOBAL_LIST_EMPTY(AdminProcCallSpamPrevention) +GLOBAL_PROTECT(AdminProcCallSpamPrevention) + +/proc/WrapAdminProcCall(datum/target, procname, list/arguments) + if(target && procname == "Del") + to_chat(usr, "Calling Del() is not allowed") + return + + if(target != GLOBAL_PROC && !target.CanProcCall(procname)) + to_chat(usr, "Proccall on [target.type]/proc/[procname] is disallowed!") + return + var/current_caller = GLOB.AdminProcCaller + var/ckey = usr ? usr.client.ckey : GLOB.AdminProcCaller + if(!ckey) + CRASH("WrapAdminProcCall with no ckey: [target] [procname] [english_list(arguments)]") + if(current_caller && current_caller != ckey) + if(!GLOB.AdminProcCallSpamPrevention[ckey]) + to_chat(usr, "Another set of admin called procs are still running, your proc will be run after theirs finish.") + GLOB.AdminProcCallSpamPrevention[ckey] = TRUE + UNTIL(!GLOB.AdminProcCaller) + to_chat(usr, "Running your proc") + GLOB.AdminProcCallSpamPrevention -= ckey + else + UNTIL(!GLOB.AdminProcCaller) + GLOB.LastAdminCalledProc = procname + if(target != GLOBAL_PROC) + GLOB.LastAdminCalledTargetRef = "\ref[target]" + GLOB.AdminProcCaller = ckey //if this runtimes, too bad for you + ++GLOB.AdminProcCallCount + . = world.WrapAdminProcCall(target, procname, arguments) + if(--GLOB.AdminProcCallCount == 0) + GLOB.AdminProcCaller = null + +//adv proc call this, ya nerds +/world/proc/WrapAdminProcCall(datum/target, procname, list/arguments) + if(target == GLOBAL_PROC) + return call(procname)(arglist(arguments)) + else if(target != world) + return call(target, procname)(arglist(arguments)) + else + log_admin("[key_name(usr)] attempted to call world/proc/[procname] with arguments: [english_list(arguments)]") + +/proc/IsAdminAdvancedProcCall() +#ifdef TESTING + return FALSE +#else + return usr && usr.client && GLOB.AdminProcCaller == usr.client.ckey +#endif + +/client/proc/callproc_datum(datum/A as null|area|mob|obj|turf) + set category = "Debug" + set name = "Atom ProcCall" + set waitfor = 0 + + if(!check_rights(R_DEBUG)) + return + + var/procname = input("Proc name, eg: fake_blood","Proc:", null) as text|null + if(!procname) + return + if(!hascall(A,procname)) + to_chat(usr, "Error: callproc_datum(): type [A.type] has no proc named [procname].") + return + var/list/lst = get_callproc_args() + if(!lst) + return + + if(!A || !IsValidSrc(A)) + to_chat(usr, "Error: callproc_datum(): owner of proc no longer exists.") + return + var/msg = "[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]." + log_admin(msg) + //message_admins(msg) + admin_ticket_log(A, msg) + feedback_add_details("admin_verb","TPC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + + var/returnval = WrapAdminProcCall(A, procname, lst) // Pass the lst as an argument list to the proc + . = get_callproc_returnval(returnval,procname) + if(.) + to_chat(usr, .) + +/client/proc/get_callproc_args() + var/argnum = input("Number of arguments","Number:",0) as num|null + if(isnull(argnum)) + return null //Cancel + + . = list() + //var/list/named_args = list() //Named arguments are removed, due to them making proccalling take too long. + while(argnum--) + /* //Named arguments are removed, due to them making proccalling take too long. + var/named_arg = input("Leave blank for positional argument. Positional arguments will be considered as if they were added first.", "Named argument") as text|null + if(isnull(named_arg)) + return null //Cancel + */ + var/value = vv_get_value(restricted_classes = list(VV_RESTORE_DEFAULT)) + if (!value["class"]) + return null //Cancel + /* //Named arguments are removed, due to them making proccalling take too long. + if(named_arg) + named_args[named_arg] = value["value"] + else + . += value["value"] + if(LAZYLEN(named_args)) + . += named_args + */ + . += value["value"] + +/client/proc/get_callproc_returnval(returnval,procname) + . = "" + if(islist(returnval)) + var/list/returnedlist = returnval + . = "" + if(returnedlist.len) + var/assoc_check = returnedlist[1] + if(istext(assoc_check) && (returnedlist[assoc_check] != null)) + . += "[procname] returned an associative list:" + for(var/key in returnedlist) + . += "\n[key] = [returnedlist[key]]" + + else + . += "[procname] returned a list:" + for(var/elem in returnedlist) + . += "\n[elem]" + else + . = "[procname] returned an empty list" + . += "" + + else + . = "[procname] returned: [!isnull(returnval) ? returnval : "null"]" +>>>>>>> 1ed5556... Adds empty filter classes to send messages to particular vchat filters. (#6998) diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm index 92fd1c300b..51d50218ec 100644 --- a/code/modules/admin/holder2.dm +++ b/code/modules/admin/holder2.dm @@ -76,7 +76,7 @@ NOTE: It checks usr by default. Supply the "user" argument if you wish to check return FALSE if(!C.holder) if(show_msg) - to_chat(C, "Error: You are not an admin.") + to_chat(C, "Error: You are not an admin.") return FALSE if(rights_required) @@ -84,7 +84,7 @@ NOTE: It checks usr by default. Supply the "user" argument if you wish to check return TRUE else if(show_msg) - to_chat(C, "Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].") + to_chat(C, "Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].") return FALSE else return TRUE @@ -98,7 +98,7 @@ NOTE: It checks usr by default. Supply the "user" argument if you wish to check if(usr.client.holder.rights != other.holder.rights) if( (usr.client.holder.rights & other.holder.rights) == other.holder.rights ) return 1 //we have all the rights they have and more - to_chat(usr, "Error: Cannot proceed. They have more or equal rights to us.") + to_chat(usr, "Error: Cannot proceed. They have more or equal rights to us.") return 0 /client/proc/mark_datum(datum/D) diff --git a/code/modules/admin/map_capture.dm b/code/modules/admin/map_capture.dm index a8cf7717fc..68460ebaae 100644 --- a/code/modules/admin/map_capture.dm +++ b/code/modules/admin/map_capture.dm @@ -7,13 +7,13 @@ return if(isnull(tx) || isnull(ty) || isnull(tz) || isnull(range)) - to_chat(usr, "Capture Map Part, captures part of a map using camara like rendering.") - to_chat(usr, "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range") - to_chat(usr, "Target coordinates specify bottom left corner of the capture, range defines render distance to opposite corner.") + to_chat(usr, "Capture Map Part, captures part of a map using camara like rendering.") + to_chat(usr, "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range.") + to_chat(usr, "Target coordinates specify bottom left corner of the capture, range defines render distance to opposite corner.") return if(range > 32 || range <= 0) - to_chat(usr, "Capturing range is incorrect, it must be within 1-32.") + to_chat(usr, "Capturing range is incorrect, it must be within 1-32.") return if(locate(tx,ty,tz)) @@ -53,7 +53,7 @@ cap.Blend(img, blendMode2iconMode(A.blend_mode), A.pixel_x + xoff, A.pixel_y + yoff) var/file_name = "map_capture_x[tx]_y[ty]_z[tz]_r[range].png" - to_chat(usr, "Saved capture in cache as [file_name].") + to_chat(usr, "Saved capture in cache as [file_name].") usr << browse_rsc(cap, file_name) else - to_chat(usr, "Target coordinates are incorrect.") + to_chat(usr, "Target coordinates are incorrect.") diff --git a/code/modules/admin/permissionverbs/permissionedit.dm b/code/modules/admin/permissionverbs/permissionedit.dm index e75d008576..6a579b96af 100644 --- a/code/modules/admin/permissionverbs/permissionedit.dm +++ b/code/modules/admin/permissionverbs/permissionedit.dm @@ -51,13 +51,13 @@ return if(!usr.client.holder || !(usr.client.holder.rights & R_PERMISSIONS)) - to_chat(usr, "You do not have permission to do this!") + to_chat(usr, "You do not have permission to do this!") return establish_db_connection() if(!dbcon.IsConnected()) - to_chat(usr, "Failed to establish database connection") + to_chat(usr, "Failed to establish database connection") return if(!adm_ckey || !new_rank) @@ -85,14 +85,14 @@ insert_query.Execute() var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');") log_query.Execute() - to_chat(usr, "New admin added.") + to_chat(usr, "New admin added.") else if(!isnull(admin_id) && isnum(admin_id)) var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET rank = '[new_rank]' WHERE id = [admin_id]") insert_query.Execute() var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');") log_query.Execute() - to_chat(usr, "Admin rank changed.") + to_chat(usr, "Admin rank changed.") /datum/admins/proc/log_admin_permission_modification(var/adm_ckey, var/new_permission) if(config.admin_legacy_system) return @@ -101,12 +101,12 @@ return if(!usr.client.holder || !(usr.client.holder.rights & R_PERMISSIONS)) - to_chat(usr, "You do not have permission to do this!") + to_chat(usr, "You do not have permission to do this!") return establish_db_connection() if(!dbcon.IsConnected()) - to_chat(usr, "Failed to establish database connection") + to_chat(usr, "Failed to establish database connection") return if(!adm_ckey || !new_permission) @@ -140,10 +140,10 @@ insert_query.Execute() var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');") log_query.Execute() - to_chat(usr, "Permission removed.") + to_chat(usr, "Permission removed.") else //This admin doesn't have this permission, so we are adding it. var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET flags = '[admin_rights | new_permission]' WHERE id = [admin_id]") insert_query.Execute() var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]')") log_query.Execute() - to_chat(usr, "Permission added.") \ No newline at end of file + to_chat(usr, "Permission added.") \ No newline at end of file diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index fe6048d0c2..f3ebd6a146 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -63,23 +63,23 @@ switch(bantype) if(BANTYPE_PERMA) if(!banckey || !banreason) - to_chat(usr, "Not enough parameters (Requires ckey and reason)") + to_chat(usr, "Not enough parameters (Requires ckey and reason)") return banduration = null banjob = null if(BANTYPE_TEMP) if(!banckey || !banreason || !banduration) - to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)") + to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)") return banjob = null if(BANTYPE_JOB_PERMA) if(!banckey || !banreason || !banjob) - to_chat(usr, "Not enough parameters (Requires ckey, reason and job)") + to_chat(usr, "Not enough parameters (Requires ckey, reason and job)") return banduration = null if(BANTYPE_JOB_TEMP) if(!banckey || !banreason || !banjob || !banduration) - to_chat(usr, "Not enough parameters (Requires ckey, reason and job)") + to_chat(usr, "Not enough parameters (Requires ckey, reason and job)") return var/mob/playermob @@ -116,14 +116,14 @@ var/new_ckey = ckey(input(usr,"New admin's ckey","Admin ckey", null) as text|null) if(!new_ckey) return if(new_ckey in admin_datums) - to_chat(usr, "Error: Topic 'editrights': [new_ckey] is already an admin") + to_chat(usr, "Error: Topic 'editrights': [new_ckey] is already an admin") return adm_ckey = new_ckey task = "rank" else if(task != "show") adm_ckey = ckey(href_list["ckey"]) if(!adm_ckey) - to_chat(usr, "Error: Topic 'editrights': No valid ckey") + to_chat(usr, "Error: Topic 'editrights': No valid ckey") return var/datum/admins/D = admin_datums[adm_ckey] @@ -155,7 +155,7 @@ if(config.admin_legacy_system) new_rank = ckeyEx(new_rank) if(!new_rank) - to_chat(usr, "Error: Topic 'editrights': Invalid rank") + to_chat(usr, "Error: Topic 'editrights': Invalid rank") return if(config.admin_legacy_system) if(admin_ranks.len) @@ -264,7 +264,7 @@ var/mob/M = locate(href_list["mob"]) if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return var/delmob = 0 @@ -370,14 +370,14 @@ var/mob/M = locate(href_list["jobban2"]) if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return if(!M.ckey) //sanity - to_chat(usr, "This mob has no ckey") + to_chat(usr, "This mob has no ckey") return if(!job_master) - to_chat(usr, "Job Master has not been setup!") + to_chat(usr, "Job Master has not been setup!") return var/dat = "" @@ -631,16 +631,16 @@ //JOBBAN'S INNARDS else if(href_list["jobban3"]) if(!check_rights(R_MOD,0) && !check_rights(R_ADMIN,0)) - to_chat(usr, "You do not have the appropriate permissions to add job bans!") + to_chat(usr, "You do not have the appropriate permissions to add job bans!") return if(check_rights(R_MOD,0) && !check_rights(R_ADMIN,0) && !config.mods_can_job_tempban) // If mod and tempban disabled - to_chat(usr, "Mod jobbanning is disabled!") + to_chat(usr, "Mod jobbanning is disabled!") return var/mob/M = locate(href_list["jobban4"]) if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return if(M != usr) //we can jobban ourselves @@ -649,7 +649,7 @@ return if(!job_master) - to_chat(usr, "Job Master has not been setup!") + to_chat(usr, "Job Master has not been setup!") return //get jobs for department if specified, otherwise just returnt he one job in a list. @@ -726,16 +726,16 @@ switch(alert("Temporary Ban?",,"Yes","No", "Cancel")) if("Yes") if(!check_rights(R_MOD,0) && !check_rights(R_BAN, 0)) - to_chat(usr, " You Cannot issue temporary job-bans!") + to_chat(usr, " You Cannot issue temporary job-bans!") return if(config.ban_legacy_system) - to_chat(usr, "Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban.") + to_chat(usr, "Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban.") return var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null if(!mins) return if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > config.mod_job_tempban_max) - to_chat(usr, " Moderators can only job tempban up to [config.mod_job_tempban_max] minutes!") + to_chat(usr, " Moderators can only job tempban up to [config.mod_job_tempban_max] minutes!") return var/reason = sanitize(input(usr,"Reason?","Please State Reason","") as text|null) if(!reason) @@ -755,9 +755,9 @@ msg += ", [job]" notes_add(M.ckey, "Banned from [msg] - [reason]", usr) message_admins("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes", 1) - to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].") - to_chat(M, "The reason is: [reason]") - to_chat(M, "This jobban will be lifted in [mins] minutes.") + to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].") + to_chat(M, "The reason is: [reason]") + to_chat(M, "This jobban will be lifted in [mins] minutes.") href_list["jobban2"] = 1 // lets it fall through and refresh return 1 if("No") @@ -776,9 +776,9 @@ else msg += ", [job]" notes_add(M.ckey, "Banned from [msg] - [reason]", usr) message_admins("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg]", 1) - to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].") - to_chat(M, "The reason is: [reason]") - to_chat(M, "Jobban can be lifted only upon request.") + to_chat(M, "You have been jobbanned by [usr.client.ckey] from: [msg].") + to_chat(M, "The reason is: [reason]") + to_chat(M, "Jobban can be lifted only upon request.") href_list["jobban2"] = 1 // lets it fall through and refresh return 1 if("Cancel") @@ -788,7 +788,7 @@ //all jobs in joblist are banned already OR we didn't give a reason (implying they shouldn't be banned) if(joblist.len) //at least 1 banned job exists in joblist so we have stuff to unban. if(!config.ban_legacy_system) - to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel") + to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel") DB_ban_panel(M.ckey) return var/msg @@ -809,7 +809,7 @@ continue if(msg) message_admins("[key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg]", 1) - to_chat(M, "You have been un-jobbanned by [usr.client.ckey] from [msg].") + to_chat(M, "You have been un-jobbanned by [usr.client.ckey] from [msg].") href_list["jobban2"] = 1 // lets it fall through and refresh return 1 return 0 //we didn't do anything! @@ -823,7 +823,7 @@ if(!reason) return - to_chat(M, span("critical", "You have been kicked from the server: [reason]")) + to_chat(M, span("filter_system critical", "You have been kicked from the server: [reason]")) log_admin("[key_name(usr)] booted [key_name(M)] for reason: '[reason]'.") message_admins("[key_name_admin(usr)] booted [key_name_admin(M)] for reason '[reason]'.", 1) //M.client = null @@ -874,15 +874,15 @@ AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins) ban_unban_log_save("[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.") notes_add(M.ckey,"[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.",usr) - to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].") - to_chat(M, "This is a temporary ban, it will be removed in [mins] minutes.") + to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].") + to_chat(M, "This is a temporary ban, it will be removed in [mins] minutes.") feedback_inc("ban_tmp",1) DB_ban_record(BANTYPE_TEMP, M, mins, reason) feedback_inc("ban_tmp_mins",mins) if(config.banappeals) - to_chat(M, "To try to resolve this matter head to [config.banappeals]") + to_chat(M, "To try to resolve this matter head to [config.banappeals]") else - to_chat(M, "No ban appeals URL has been set.") + to_chat(M, "No ban appeals URL has been set.") log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.") message_admins("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.") var/datum/admin_help/AH = M.client ? M.client.current_ticket : null @@ -901,12 +901,12 @@ AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP) if("No") AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0) - to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].") - to_chat(M, "This is a permanent ban.") + to_chat(M, "You have been banned by [usr.client.ckey].\nReason: [reason].") + to_chat(M, "This is a permanent ban.") if(config.banappeals) - to_chat(M, "To try to resolve this matter head to [config.banappeals]") + to_chat(M, "To try to resolve this matter head to [config.banappeals]") else - to_chat(M, "No ban appeals URL has been set.") + to_chat(M, "No ban appeals URL has been set.") ban_unban_log_save("[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.") notes_add(M.ckey,"[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.",usr) log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.") @@ -992,7 +992,7 @@ var/mob/living/carbon/human/H = locate(href_list["monkeyone"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return log_admin("[key_name(usr)] attempting to monkeyize [key_name(H)]") @@ -1004,7 +1004,7 @@ var/mob/living/carbon/human/H = locate(href_list["corgione"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return log_admin("[key_name(usr)] attempting to corgize [key_name(H)]") @@ -1016,7 +1016,7 @@ var/mob/M = locate(href_list["forcespeech"]) if(!ismob(M)) - to_chat(usr, "this can only be used on instances of type /mob") + to_chat(usr, "this can only be used on instances of type /mob") var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins. if(!speech) return @@ -1033,10 +1033,10 @@ var/mob/M = locate(href_list["sendtoprison"]) if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return var/turf/prison_cell = pick(prisonwarp) @@ -1061,7 +1061,7 @@ prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/prison(prisoner), slot_w_uniform) prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes) - to_chat(M, "You have been sent to the prison station!") + to_chat(M, "You have been sent to the prison station!") log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.") message_admins("[key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.", 1) @@ -1071,11 +1071,11 @@ var/mob/M = locate(href_list["sendbacktolobby"]) if(!isobserver(M)) - to_chat(usr, "You can only send ghost players back to the Lobby.") + to_chat(usr, "You can only send ghost players back to the Lobby.") return if(!M.client) - to_chat(usr, "[M] doesn't seem to have an active client.") + to_chat(usr, "[M] doesn't seem to have an active client.") return if(alert(usr, "Send [key_name(M)] back to Lobby?", "Message", "Yes", "No") != "Yes") @@ -1096,10 +1096,10 @@ var/mob/M = locate(href_list["tdome1"]) if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return for(var/obj/item/I in M) @@ -1109,7 +1109,7 @@ sleep(5) M.loc = pick(tdome1) spawn(50) - to_chat(M, "You have been sent to the Thunderdome.") + to_chat(M, "You have been sent to the Thunderdome.") log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 1)") message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 1)", 1) @@ -1121,10 +1121,10 @@ var/mob/M = locate(href_list["tdome2"]) if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return for(var/obj/item/I in M) @@ -1134,7 +1134,7 @@ sleep(5) M.loc = pick(tdome2) spawn(50) - to_chat(M, "You have been sent to the Thunderdome.") + to_chat(M, "You have been sent to the Thunderdome.") log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 2)") message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 2)", 1) @@ -1146,17 +1146,17 @@ var/mob/M = locate(href_list["tdomeadmin"]) if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return M.Paralyse(5) sleep(5) M.loc = pick(tdomeadmin) spawn(50) - to_chat(M, "You have been sent to the Thunderdome.") + to_chat(M, "You have been sent to the Thunderdome.") log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Admin.)") message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Admin.)", 1) @@ -1168,10 +1168,10 @@ var/mob/M = locate(href_list["tdomeobserve"]) if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return if(istype(M, /mob/living/silicon/ai)) - to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") + to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai") return for(var/obj/item/I in M) @@ -1185,7 +1185,7 @@ sleep(5) M.loc = pick(tdomeobserve) spawn(50) - to_chat(M, "You have been sent to the Thunderdome.") + to_chat(M, "You have been sent to the Thunderdome.") log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)") message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)", 1) @@ -1194,7 +1194,7 @@ var/mob/living/L = locate(href_list["revive"]) if(!istype(L)) - to_chat(usr, "This can only be used on instances of type /mob/living") + to_chat(usr, "This can only be used on instances of type /mob/living") return if(config.allow_admin_rev) @@ -1202,14 +1202,14 @@ message_admins("Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!", 1) log_admin("[key_name(usr)] healed / Rrvived [key_name(L)]") else - to_chat(usr, "Admin Rejuvinates have been disabled") + to_chat(usr, "Admin Rejuvinates have been disabled") else if(href_list["makeai"]) if(!check_rights(R_SPAWN)) return var/mob/living/carbon/human/H = locate(href_list["makeai"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return message_admins("Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!", 1) @@ -1221,7 +1221,7 @@ var/mob/living/carbon/human/H = locate(href_list["makealien"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return usr.client.cmd_admin_alienize(H) @@ -1231,7 +1231,7 @@ var/mob/living/carbon/human/H = locate(href_list["makerobot"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return usr.client.cmd_admin_robotize(H) @@ -1241,7 +1241,7 @@ var/mob/M = locate(href_list["makeanimal"]) if(istype(M, /mob/new_player)) - to_chat(usr, "This cannot be used on instances of type /mob/new_player") + to_chat(usr, "This cannot be used on instances of type /mob/new_player") return usr.client.cmd_admin_animalize(M) @@ -1260,7 +1260,7 @@ var/mob/living/carbon/human/H = locate(href_list["togmutate"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return var/block=text2num(href_list["block"]) usr.client.cmd_admin_toggle_block(H,block) @@ -1303,6 +1303,7 @@ for(var/client/X in admins) if((R_ADMIN|R_MOD|R_SERVER) & X.holder.rights) //VOREStation Edit to_chat(X, take_msg) +<<<<<<< HEAD to_chat(M, "Your adminhelp is being attended to by [usr.client]. Thanks for your patience!") // VoreStation Edit Start if (config.chat_webhook_url) @@ -1313,6 +1314,9 @@ query_string += "&user=[url_encode(key_name(M))]" world.Export("[config.chat_webhook_url]?[query_string]") // VoreStation Edit End +======= + to_chat(M, "Your adminhelp is being attended to by [usr.client]. Thanks for your patience!") +>>>>>>> 1ed5556... Adds empty filter classes to send messages to particular vchat filters. (#6998) else to_chat(usr, "Unable to locate mob.") @@ -1334,7 +1338,7 @@ else if(href_list["adminmoreinfo"]) var/mob/M = locate(href_list["adminmoreinfo"]) if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob") + to_chat(usr, "This can only be used on instances of type /mob") return var/location_description = "" @@ -1374,19 +1378,20 @@ if(MALE,FEMALE) gender_description = "[M.gender]" else gender_description = "[M.gender]" - to_chat(src.owner, "Info about [M.name]: ") - to_chat(src.owner, "Mob type = [M.type]; Gender = [gender_description] Damage = [health_description]") - to_chat(src.owner, "Name = [M.name]; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = [M.key];") - to_chat(src.owner, "Location = [location_description];") - to_chat(src.owner, "[special_role_description]") - to_chat(src.owner, "(PM) (PP) (VV) (SM) ([admin_jump_link(M, src)]) (CA)") + to_chat(src.owner, "Info about [M.name]:
\ + Mob type = [M.type]; Gender = [gender_description] Damage = [health_description]
\ + Name = [M.name]; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = [M.key];
\ + Location = [location_description];
\ + [special_role_description]
\ + (PM) (PP) (VV) \ + (SM) ([admin_jump_link(M, src)]) (CA)
") else if(href_list["adminspawncookie"]) if(!check_rights(R_ADMIN|R_FUN|R_EVENT)) return var/mob/living/carbon/human/H = locate(href_list["adminspawncookie"]) if(!ishuman(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return H.equip_to_slot_or_del( new /obj/item/weapon/reagent_containers/food/snacks/cookie(H), slot_l_hand ) @@ -1403,14 +1408,14 @@ log_admin("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]") message_admins("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]") feedback_inc("admin_cookies_spawned",1) - to_chat(H, "Your prayers have been answered!! You received the best cookie!") + to_chat(H, "Your prayers have been answered!! You received the best cookie!") else if(href_list["adminsmite"]) if(!check_rights(R_ADMIN|R_FUN|R_EVENT)) return var/mob/living/carbon/human/H = locate(href_list["adminsmite"]) if(!ishuman(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return owner.smite(H) @@ -1420,7 +1425,7 @@ var/mob/living/M = locate(href_list["BlueSpaceArtillery"]) if(!isliving(M)) - to_chat(usr, "This can only be used on instances of type /mob/living") + to_chat(usr, "This can only be used on instances of type /mob/living") return if(alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Blue Space Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes") @@ -1431,14 +1436,14 @@ else if(href_list["CentComReply"]) var/mob/living/L = locate(href_list["CentComReply"]) if(!istype(L)) - to_chat(usr, "This can only be used on instances of type /mob/living/") + to_chat(usr, "This can only be used on instances of type /mob/living/") return if(L.can_centcom_reply()) var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(L)] via their headset.","Outgoing message from CentCom", "")) if(!input) return - to_chat(src.owner, "You sent [input] to [L] via a secure channel.") + to_chat(src.owner, "You sent [input] to [L] via a secure channel.") log_admin("[src.owner] replied to [key_name(L)]'s CentCom message with the message [input].") message_admins("[src.owner] replied to [key_name(L)]'s CentCom message with: \"[input]\"") if(!isAI(L)) @@ -1448,24 +1453,25 @@ to_chat(L, "[input]") to_chat(L, "Message ends.") else - to_chat(src.owner, "The person you are trying to contact does not have functional radio equipment.") + to_chat(src.owner, "The person you are trying to contact does not have functional radio equipment.") else if(href_list["SyndicateReply"]) var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"]) if(!istype(H)) - to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") return if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset)) - to_chat(usr, "The person you are trying to contact is not wearing a headset") + to_chat(usr, "The person you are trying to contact is not wearing a headset") return var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from a shadowy figure...", "")) if(!input) return - to_chat(src.owner, "You sent [input] to [H] via a secure channel.") + to_chat(src.owner, "You sent [input] to [H] via a secure channel.") log_admin("[src.owner] replied to [key_name(H)]'s illegal message with the message [input].") - to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. \"[input]\" Message ends.\"") + to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \ + \"Please stand by for a message from your benefactor. Message as follows, agent. \"[input]\" Message ends.\"") else if(href_list["AdminFaxView"]) var/obj/item/fax = locate(href_list["AdminFaxView"]) @@ -1487,7 +1493,7 @@ usr << browse(data, "window=[B.name]") else - to_chat(usr, "The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]") + to_chat(usr, "The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]") else if (href_list["AdminFaxViewPage"]) var/page = text2num(href_list["AdminFaxViewPage"]) @@ -1559,7 +1565,7 @@ var/mob/M = locate(href_list["traitor"]) if(!ismob(M)) - to_chat(usr, "This can only be used on instances of type /mob.") + to_chat(usr, "This can only be used on instances of type /mob.") return show_traitor_panel(M) @@ -1583,7 +1589,7 @@ if(!check_rights(R_SPAWN)) return if(!config.allow_admin_spawning) - to_chat(usr, "Spawning of items is not allowed.") + to_chat(usr, "Spawning of items is not allowed.") return var/atom/loc = usr.loc @@ -1643,24 +1649,24 @@ where = "onfloor" if( where == "inhand" ) - to_chat(usr, "Support for inhand not available yet. Will spawn on floor.") + to_chat(usr, "Support for inhand not available yet. Will spawn on floor.") where = "onfloor" if ( where == "inhand" ) //Can only give when human or monkey if ( !( ishuman(usr) || issmall(usr) ) ) - to_chat(usr, "Can only spawn in hand when you're a human or a monkey.") + to_chat(usr, "Can only spawn in hand when you're a human or a monkey.") where = "onfloor" else if ( usr.get_active_hand() ) - to_chat(usr, "Your active hand is full. Spawning on floor.") + to_chat(usr, "Your active hand is full. Spawning on floor.") where = "onfloor" if ( where == "inmarked" ) if ( !marked_datum ) - to_chat(usr, "You don't have any object marked. Abandoning spawn.") + to_chat(usr, "You don't have any object marked. Abandoning spawn.") return else if ( !istype(marked_datum,/atom) ) - to_chat(usr, "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.") + to_chat(usr, "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.") return var/atom/target //Where the object will be spawned @@ -1912,17 +1918,17 @@ if(check_rights(R_SPAWN)) //VOREStation Edit var/mob/M = locate(href_list["toglang"]) if(!istype(M)) - to_chat(usr, "[M] is illegal type, must be /mob!") + to_chat(usr, "[M] is illegal type, must be /mob!") return var/lang2toggle = href_list["lang"] var/datum/language/L = GLOB.all_languages[lang2toggle] if(L in M.languages) if(!M.remove_language(lang2toggle)) - to_chat(usr, "Failed to remove language '[lang2toggle]' from \the [M]!") + to_chat(usr, "Failed to remove language '[lang2toggle]' from \the [M]!") else if(!M.add_language(lang2toggle)) - to_chat(usr, "Failed to add language '[lang2toggle]' from \the [M]!") + to_chat(usr, "Failed to add language '[lang2toggle]' from \the [M]!") show_player_panel(M) diff --git a/code/modules/admin/verbs/BrokenInhands.dm b/code/modules/admin/verbs/BrokenInhands.dm index 654badec7f..2ddfd393f4 100644 --- a/code/modules/admin/verbs/BrokenInhands.dm +++ b/code/modules/admin/verbs/BrokenInhands.dm @@ -31,6 +31,6 @@ var/F = file("broken_icons.txt") fdel(F) F << text - to_world("Completeled successfully and written to [F]") + to_world("Completeled successfully and written to [F]") diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index b73731a299..6c8b4fda3d 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -266,7 +266,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) AddInteraction("Reopened by [key_name_admin(usr)]") if(initiator) - to_chat(initiator, "Ticket [TicketHref("#[id]")] was reopened by [key_name(usr,FALSE,FALSE)].") + to_chat(initiator, "Ticket [TicketHref("#[id]")] was reopened by [key_name(usr,FALSE,FALSE)].") var/msg = "Ticket [TicketHref("#[id]")] reopened by [key_name_admin(usr)]." message_admins(msg) log_admin(msg) @@ -290,9 +290,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) RemoveActive() state = AHELP_CLOSED GLOB.ahelp_tickets.ListInsert(src) - AddInteraction("Closed by [key_name_admin(usr)].") + AddInteraction("Closed by [key_name_admin(usr)].") if(initiator) - to_chat(initiator, "Ticket [TicketHref("#[id]")] was closed by [key_name(usr,FALSE,FALSE)].") + to_chat(initiator, "Ticket [TicketHref("#[id]")] was closed by [key_name(usr,FALSE,FALSE)].") if(!silent) feedback_inc("ahelp_close") var/msg = "Ticket [TicketHref("#[id]")] closed by [key_name_admin(usr)]." @@ -307,9 +307,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) state = AHELP_RESOLVED GLOB.ahelp_tickets.ListInsert(src) - AddInteraction("Resolved by [key_name_admin(usr)].") + AddInteraction("Resolved by [key_name_admin(usr)].") if(initiator) - to_chat(initiator, "Ticket [TicketHref("#[id]")] was marked resolved by [key_name(usr,FALSE,FALSE)].") + to_chat(initiator, "Ticket [TicketHref("#[id]")] was marked resolved by [key_name(usr,FALSE,FALSE)].") if(!silent) feedback_inc("ahelp_resolve") var/msg = "Ticket [TicketHref("#[id]")] resolved by [key_name_admin(usr)]" @@ -325,9 +325,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) if(initiator.is_preference_enabled(/datum/client_preference/holder/play_adminhelp_ping)) initiator << 'sound/effects/adminhelp.ogg' - to_chat(initiator, "- AdminHelp Rejected! -") - to_chat(initiator, "Your admin help was rejected.") - to_chat(initiator, "Please try to be calm, clear, and descriptive in admin helps, do not assume the admin has seen any related events, and clearly state the names of anybody you are reporting.") + to_chat(initiator, "- AdminHelp Rejected! -
\ + Your admin help was rejected.
\ + Please try to be calm, clear, and descriptive in admin helps, do not assume the admin has seen any related events, and clearly state the names of anybody you are reporting.
") feedback_inc("ahelp_reject") var/msg = "Ticket [TicketHref("#[id]")] rejected by [key_name_admin(usr)]" @@ -341,9 +341,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) if(state != AHELP_ACTIVE) return - var/msg = "- AdminHelp marked as IC issue! -
" + var/msg = "- AdminHelp marked as IC issue! -
" msg += "This is something that can be solved ICly, and does not currently require staff intervention.
" - msg += "Your AdminHelp may also be unanswerable due to ongoing events." + msg += "Your AdminHelp may also be unanswerable due to ongoing events.
" if(initiator) to_chat(initiator, msg) diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index e414a774cd..98f818f926 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -55,7 +55,7 @@ A.on_mob_jump() A.forceMove(T) else - to_chat(A, "This mob is not located in the game world.") + to_chat(A, "This mob is not located in the game world.") else alert("Admin jumping disabled") @@ -94,7 +94,7 @@ keys += M.client var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys) if(!selection) - to_chat(src, "No keys found.") + to_chat(src, "No keys found.") return var/mob/M = selection:mob log_admin("[key_name(usr)] jumped to [key_name(M)]") diff --git a/code/modules/admin/verbs/atmosdebug.dm b/code/modules/admin/verbs/atmosdebug.dm index 2f7d65db05..0691e370e5 100644 --- a/code/modules/admin/verbs/atmosdebug.dm +++ b/code/modules/admin/verbs/atmosdebug.dm @@ -3,8 +3,8 @@ set name = "Check Piping" set background = 1 if(!src.holder) - to_chat(src, "Only administrators may use this command.") return + feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! if(alert("WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", "No", "Yes") == "No") @@ -14,17 +14,17 @@ //all plumbing - yes, some things might get stated twice, doesn't matter. for (var/obj/machinery/atmospherics/plumbing in machines) if (plumbing.nodealert) - to_chat(usr, "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])") + to_chat(usr, "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])") //Manifolds for (var/obj/machinery/atmospherics/pipe/manifold/pipe in machines) if (!pipe.node1 || !pipe.node2 || !pipe.node3) - to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])") + to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])") //Pipes for (var/obj/machinery/atmospherics/pipe/simple/pipe in machines) if (!pipe.node1 || !pipe.node2) - to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])") + to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])") to_chat(usr, "Checking for overlapping pipes...") next_turf: @@ -36,7 +36,7 @@ for(var/connect_type in pipe.connect_types) connect_types[connect_type] += 1 if(connect_types[1] > 1 || connect_types[2] > 1 || connect_types[3] > 1) - to_chat(usr, "Overlapping pipe ([pipe.name]) located at [T.x],[T.y],[T.z] ([get_area(T)])") + to_chat(usr, "Overlapping pipe ([pipe.name]) located at [T.x],[T.y],[T.z] ([get_area(T)])") continue next_turf to_chat(usr, "Done") @@ -44,17 +44,17 @@ set category = "Mapping" set name = "Check Power" if(!src.holder) - to_chat(src, "Only administrators may use this command.") return + feedback_add_details("admin_verb","CPOW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! for (var/datum/powernet/PN in powernets) if (!PN.nodes || !PN.nodes.len) if(PN.cables && (PN.cables.len > 1)) var/obj/structure/cable/C = PN.cables[1] - to_chat(usr, "Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]") + to_chat(usr, "Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]") if (!PN.cables || (PN.cables.len < 10)) if(PN.cables && (PN.cables.len > 1)) var/obj/structure/cable/C = PN.cables[1] - to_chat(usr, "Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]") \ No newline at end of file + to_chat(usr, "Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]") \ No newline at end of file diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm index a5e9c15029..6a0d8ba266 100644 --- a/code/modules/admin/verbs/buildmode.dm +++ b/code/modules/admin/verbs/buildmode.dm @@ -88,85 +88,83 @@ switch(master.cl.buildmode) if(BUILDMODE_BASIC) - to_chat(usr, "***********************************************************") - to_chat(usr, "Left Mouse Button = Construct / Upgrade") - to_chat(usr, "Right Mouse Button = Deconstruct / Delete / Downgrade") - to_chat(usr, "Left Mouse Button + ctrl = R-Window") - to_chat(usr, "Left Mouse Button + alt = Airlock") - to_chat(usr, "") - to_chat(usr, "Use the button in the upper left corner to") - to_chat(usr, "change the direction of built objects.") - to_chat(usr, "***********************************************************") - + to_chat(usr, "***********************************************************
\ + Left Mouse Button = Construct / Upgrade
\ + Right Mouse Button = Deconstruct / Delete / Downgrade
\ + Left Mouse Button + ctrl = R-Window
\ + Left Mouse Button + alt = Airlock

\ + Use the button in the upper left corner to
\ + change the direction of built objects.
\ + ***********************************************************
") + if(BUILDMODE_ADVANCED) - to_chat(usr, "***********************************************************") - to_chat(usr, "Right Mouse Button on buildmode button = Set object type") - to_chat(usr, "Middle Mouse Button on buildmode button= On/Off object type saying") - to_chat(usr, "Middle Mouse Button on turf/obj = Capture object type") - to_chat(usr, "Left Mouse Button on turf/obj = Place objects") - to_chat(usr, "Right Mouse Button = Delete objects") - to_chat(usr, "Mouse Button + ctrl = Copy object type") - to_chat(usr, "") - to_chat(usr, "Use the button in the upper left corner to") - to_chat(usr, "change the direction of built objects.") - to_chat(usr, "***********************************************************") - + to_chat(usr, "***********************************************************
\ + Right Mouse Button on buildmode button = Set object type
\ + Middle Mouse Button on buildmode button= On/Off object type saying
\ + Middle Mouse Button on turf/obj = Capture object type
\ + Left Mouse Button on turf/obj = Place objects
\ + Right Mouse Button = Delete objects
\ + Mouse Button + ctrl = Copy object type

\ + Use the button in the upper left corner to
\ + change the direction of built objects.
\ + ***********************************************************
") + if(BUILDMODE_EDIT) - to_chat(usr, "***********************************************************") - to_chat(usr, "Right Mouse Button on buildmode button = Select var(type) & value") - to_chat(usr, "Left Mouse Button on turf/obj/mob = Set var(type) & value") - to_chat(usr, "Right Mouse Button on turf/obj/mob = Reset var's value") - to_chat(usr, "***********************************************************") - + to_chat(usr, "***********************************************************
\ + Right Mouse Button on buildmode button = Select var(type) & value
\ + Left Mouse Button on turf/obj/mob = Set var(type) & value
\ + Right Mouse Button on turf/obj/mob = Reset var's value
\ + ***********************************************************
") + if(BUILDMODE_THROW) - to_chat(usr, "***********************************************************") - to_chat(usr, "Left Mouse Button on turf/obj/mob = Select") - to_chat(usr, "Right Mouse Button on turf/obj/mob = Throw") - to_chat(usr, "***********************************************************") - + to_chat(usr, "***********************************************************
\ + Left Mouse Button on turf/obj/mob = Select
\ + Right Mouse Button on turf/obj/mob = Throw
\ + ***********************************************************
") + if(BUILDMODE_ROOM) - to_chat(usr, "***********************************************************") - to_chat(usr, "Left Mouse Button on turf = Select as point A") - to_chat(usr, "Right Mouse Button on turf = Select as point B") - to_chat(usr, "Right Mouse Button on buildmode button = Change floor/wall type") - to_chat(usr, "***********************************************************") - + to_chat(usr, "***********************************************************
\ + Left Mouse Button on turf = Select as point A
\ + Right Mouse Button on turf = Select as point B
\ + Right Mouse Button on buildmode button = Change floor/wall type
\ + ***********************************************************
") + if(BUILDMODE_LADDER) - to_chat(usr, "***********************************************************") - to_chat(usr, "Left Mouse Button on turf = Set as upper ladder loc") - to_chat(usr, "Right Mouse Button on turf = Set as lower ladder loc") - to_chat(usr, "***********************************************************") - + to_chat(usr, "***********************************************************
\ + Left Mouse Button on turf = Set as upper ladder loc
\ + Right Mouse Button on turf = Set as lower ladder loc
\ + ***********************************************************
") + if(BUILDMODE_CONTENTS) - to_chat(usr, "***********************************************************") - to_chat(usr, "Left Mouse Button on turf/obj/mob = Select") - to_chat(usr, "Right Mouse Button on turf/obj/mob = Move into selection") - to_chat(usr, "***********************************************************") - + to_chat(usr, "***********************************************************
\ + Left Mouse Button on turf/obj/mob = Select
\ + Right Mouse Button on turf/obj/mob = Move into selection
\ + ***********************************************************
") + if(BUILDMODE_LIGHTS) - to_chat(usr, "***********************************************************") - to_chat(usr, "Left Mouse Button on turf/obj/mob = Make it glow") - to_chat(usr, "Right Mouse Button on turf/obj/mob = Reset glowing") - to_chat(usr, "Right Mouse Button on buildmode button = Change glow properties") - to_chat(usr, "***********************************************************") - + to_chat(usr, "***********************************************************
\ + Left Mouse Button on turf/obj/mob = Make it glow
\ + Right Mouse Button on turf/obj/mob = Reset glowing
\ + Right Mouse Button on buildmode button = Change glow properties
\ + ***********************************************************
") + if(BUILDMODE_AI) - to_chat(usr, "***********************************************************") - to_chat(usr, "Left Mouse Button drag box = Select only mobs in box") - to_chat(usr, "Left Mouse Button drag box + shift = Select additional mobs in area") - to_chat(usr, "Left Mouse Button on non-mob = Deselect all mobs") - to_chat(usr, "Left Mouse Button on AI mob = Select/Deselect mob") - to_chat(usr, "Left Mouse Button + alt on AI mob = Toggle hostility on mob") - to_chat(usr, "Left Mouse Button + shift on AI mob = Toggle AI (also resets)") - to_chat(usr, "Left Mouse Button + ctrl on AI mob = Copy mob faction") - to_chat(usr, "Right Mouse Button + ctrl on any mob = Paste mob faction copied with Left Mouse Button + shift") - to_chat(usr, "Right Mouse Button on enemy mob = Command selected mobs to attack mob") - to_chat(usr, "Right Mouse Button on allied mob = Command selected mobs to follow mob") - to_chat(usr, "Right Mouse Button + shift on any mob = Command selected mobs to follow mob regardless of faction") - to_chat(usr, "Right Mouse Button on tile = Command selected mobs to move to tile (will cancel if enemies are seen)") - to_chat(usr, "Right Mouse Button + shift on tile = Command selected mobs to reposition to tile (will not be inturrupted by enemies)") - to_chat(usr, "Right Mouse Button + alt on obj/turfs = Command selected mobs to attack obj/turf") - to_chat(usr, "***********************************************************") + to_chat(usr, "***********************************************************
\ + Left Mouse Button drag box = Select only mobs in box
\ + Left Mouse Button drag box + shift = Select additional mobs in area
\ + Left Mouse Button on non-mob = Deselect all mobs
\ + Left Mouse Button on AI mob = Select/Deselect mob
\ + Left Mouse Button + alt on AI mob = Toggle hostility on mob
\ + Left Mouse Button + shift on AI mob = Toggle AI (also resets)
\ + Left Mouse Button + ctrl on AI mob = Copy mob faction
\ + Right Mouse Button + ctrl on any mob = Paste mob faction copied with Left Mouse Button + shift
\ + Right Mouse Button on enemy mob = Command selected mobs to attack mob
\ + Right Mouse Button on allied mob = Command selected mobs to follow mob
\ + Right Mouse Button + shift on any mob = Command selected mobs to follow mob regardless of faction
\ + Right Mouse Button on tile = Command selected mobs to move to tile (will cancel if enemies are seen)
\ + Right Mouse Button + shift on tile = Command selected mobs to reposition to tile (will not be inturrupted by enemies)
\ + Right Mouse Button + alt on obj/turfs = Command selected mobs to attack obj/turf
\ + ***********************************************************
") return 1 /obj/effect/bmode/buildquit @@ -272,7 +270,7 @@ master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world if("turf-reference") master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world - + if(BUILDMODE_ROOM) var/choice = alert("Would you like to change the floor or wall holders?","Room Builder", "Floor", "Wall") switch(choice) @@ -280,7 +278,7 @@ floor_holder = get_path_from_partial_text(/turf/simulated/floor/plating) if("Wall") wall_holder = get_path_from_partial_text(/turf/simulated/wall) - + if(BUILDMODE_LIGHTS) var/choice = alert("Change the new light range, power, or color?", "Light Maker", "Range", "Power", "Color") switch(choice) @@ -357,7 +355,7 @@ if(NORTHWEST) var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object)) WIN.set_dir(NORTHWEST) - + if(BUILDMODE_ADVANCED) if(pa.Find("left") && !pa.Find("ctrl")) if(ispath(holder.buildmode.objholder,/turf)) @@ -399,7 +397,7 @@ if(holder.throw_atom) holder.throw_atom.throw_at(object, 10, 1) log_admin("[key_name(usr)] threw [holder.throw_atom] at [object]") - + if(BUILDMODE_ROOM) if(pa.Find("left")) holder.buildmode.coordA = get_turf(object) @@ -419,7 +417,7 @@ ) holder.buildmode.coordA = null holder.buildmode.coordB = null - + if(BUILDMODE_LADDER) if(pa.Find("left")) holder.buildmode.coordA = get_turf(object) @@ -439,7 +437,7 @@ B.update_icon() holder.buildmode.coordA = null holder.buildmode.coordB = null - + if(BUILDMODE_CONTENTS) if(pa.Find("left")) if(istype(object, /atom)) @@ -448,7 +446,7 @@ if(holder.throw_atom && istype(object, /atom/movable)) object.forceMove(holder.throw_atom) log_admin("[key_name(usr)] moved [object] into [holder.throw_atom].") - + if(BUILDMODE_LIGHTS) if(pa.Find("left")) if(object) @@ -456,7 +454,7 @@ if(pa.Find("right")) if(object) object.set_light(0, 0, "#FFFFFF") - + if(BUILDMODE_AI) if(pa.Find("left")) if(isliving(object)) @@ -509,7 +507,7 @@ else //Not living for(var/mob/living/unit in holder.selected_mobs) holder.deselect_AI_mob(user.client, unit) - + if(pa.Find("right")) // Paste faction @@ -594,7 +592,7 @@ switch(buildmode) if(BUILDMODE_AI) - + //Holding shift prevents the deselection of existing if(!pa.Find("shift")) for(var/mob/living/unit in holder.selected_mobs) @@ -610,7 +608,7 @@ var/hi_x = max(c1.x,c2.x) var/hi_y = max(c1.y,c2.y) var/z = c1.z //Eh - + var/i = 0 for(var/mob/living/L in living_mob_list) if(L.z != z || L.client) diff --git a/code/modules/admin/verbs/custom_event.dm b/code/modules/admin/verbs/custom_event.dm index 407843784a..5d9cfd3269 100644 --- a/code/modules/admin/verbs/custom_event.dm +++ b/code/modules/admin/verbs/custom_event.dm @@ -30,11 +30,10 @@ set name = "Custom Event Info" if(!custom_event_msg || custom_event_msg == "") - to_chat(src, "There currently is no known custom event taking place.") - to_chat(src, "Keep in mind: it is possible that an admin has not properly set this.") + to_chat(src, "There currently is no known custom event taking place.") + to_chat(src, "Keep in mind: it is possible that an admin has not properly set this.") return - to_chat(src, "

Custom Event

") - to_chat(src, "

A custom event is taking place. OOC Info:

") - to_chat(src, "[custom_event_msg]") - to_chat(src, "
") + to_chat(src, "

Custom Event

") + to_chat(src, "

A custom event is taking place. OOC Info:

") + to_chat(src, "[custom_event_msg]
") diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 4500379ec5..cc94db2f1d 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -582,17 +582,17 @@ switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients")) if("Players") - usr << jointext(player_list,",") + to_chat(usr, span("filter_debuglogs", jointext(player_list,","))) if("Admins") - usr << jointext(admins,",") + to_chat(usr, span("filter_debuglogs", jointext(admins,","))) if("Mobs") - usr << jointext(mob_list,",") + to_chat(usr, span("filter_debuglogs", jointext(mob_list,","))) if("Living Mobs") - usr << jointext(living_mob_list,",") + to_chat(usr, span("filter_debuglogs", jointext(living_mob_list,","))) if("Dead Mobs") - usr << jointext(dead_mob_list,",") + to_chat(usr, span("filter_debuglogs", jointext(dead_mob_list,","))) if("Clients") - usr << jointext(GLOB.clients,",") + to_chat(usr, span("filter_debuglogs", jointext(GLOB.clients,","))) /client/proc/cmd_debug_using_map() set category = "Debug" diff --git a/code/modules/vchat/js/vchat.js b/code/modules/vchat/js/vchat.js index 634cbbfe90..8300d162b2 100644 --- a/code/modules/vchat/js/vchat.js +++ b/code/modules/vchat/js/vchat.js @@ -136,7 +136,7 @@ function start_vue() { //The table to map game css classes to our vchat categories type_table: [ { - matches: ".say, .emote", + matches: ".filter_say, .say, .emote", becomes: "vc_localchat", pretty: "Local Chat", tooltip: "In-character local messages (say, emote, etc)", @@ -144,7 +144,7 @@ function start_vue() { admin: false }, { - matches: ".alert, .syndradio, .centradio, .airadio, .entradio, .comradio, .secradio, .engradio, .medradio, .sciradio, .supradio, .srvradio, .expradio, .radio, .deptradio, .newscaster", + matches: ".filter_radio, .alert, .syndradio, .centradio, .airadio, .entradio, .comradio, .secradio, .engradio, .medradio, .sciradio, .supradio, .srvradio, .expradio, .radio, .deptradio, .newscaster", becomes: "vc_radio", pretty: "Radio Comms", tooltip: "All departments of radio messages", @@ -152,7 +152,7 @@ function start_vue() { admin: false }, { - matches: ".notice:not(.pm), .adminnotice, .info, .sinister, .cult", + matches: ".filter_notice, .notice:not(.pm), .adminnotice, .info, .sinister, .cult", becomes: "vc_info", pretty: "Notices", tooltip: "Non-urgent messages from the game and items", @@ -160,7 +160,7 @@ function start_vue() { admin: false }, { - matches: ".critical, .danger, .userdanger, .warning:not(.pm), .italics", + matches: ".filter_warning, .warning:not(.pm), .critical, .userdanger, .italics", becomes: "vc_warnings", pretty: "Warnings", tooltip: "Urgent messages from the game and items", @@ -168,7 +168,7 @@ function start_vue() { admin: false }, { - matches: ".deadsay", + matches: ".filter_deadsay, .deadsay", becomes: "vc_deadchat", pretty: "Deadchat", tooltip: "All of deadchat", @@ -176,7 +176,7 @@ function start_vue() { admin: false }, { - matches: ".ooc:not(.looc)", + matches: ".filter_ooc, .ooc:not(.looc)", becomes: "vc_globalooc", pretty: "Global OOC", tooltip: "The bluewall of global OOC messages", @@ -194,7 +194,7 @@ function start_vue() { }, //VOREStation Add End { - matches: ".pm", + matches: ".filter_pm, .pm", becomes: "vc_adminpm", pretty: "Admin PMs", tooltip: "Messages to/from admins ('adminhelps')", @@ -202,7 +202,7 @@ function start_vue() { admin: false }, { - matches: ".admin_channel", + matches: ".filter_ASAY, .admin_channel", becomes: "vc_adminchat", pretty: "Admin Chat", tooltip: "ASAY messages", @@ -210,7 +210,7 @@ function start_vue() { admin: true }, { - matches: ".mod_channel", + matches: ".filter_MSAY, .mod_channel", becomes: "vc_modchat", pretty: "Mod Chat", tooltip: "MSAY messages", @@ -218,7 +218,7 @@ function start_vue() { admin: true }, { - matches: ".event_channel", + matches: ".filter_ESAY, .event_channel", becomes: "vc_eventchat", pretty: "Event Chat", tooltip: "ESAY messages", @@ -226,14 +226,46 @@ function start_vue() { admin: true }, { - matches: ".ooc.looc, .ooc .looc", //Dumb game + matches: ".filter_combat, .danger", + becomes: "vc_combat", + pretty: "Combat Logs", + tooltip: "Urist McTraitor has stabbed you with a knife!", + required: false, + admin: false + }, + { + matches: ".filter_adminlogs, .log_message", + becomes: "vc_adminlogs", + pretty: "Admin Logs", + tooltip: "ADMIN LOG: Urist McAdmin has jumped to coordinates X, Y, Z", + required: false, + admin: true + }, + { + matches: ".filter_attacklogs", + becomes: "vc_attacklogs", + pretty: "Attack Logs", + tooltip: "Urist McTraitor has shot John Doe", + required: false, + admin: true + }, + { + matches: ".filter_debuglogs", + becomes: "vc_debuglogs", + pretty: "Debug Logs", + tooltip: "DEBUG: SSPlanets subsystem Recover().", + required: false, + admin: true + }, + { + matches: ".ooc.looc, .ooc, .looc", //Dumb game becomes: "vc_looc", pretty: "Local OOC", tooltip: "Local OOC messages, always enabled", required: true }, { - matches: ".boldannounce", + matches: ".boldannounce, .filter_system", becomes: "vc_system", pretty: "System Messages", tooltip: "Messages from your client, always enabled", diff --git a/html/changelogs/atermonera_vchat_filters1.yml b/html/changelogs/atermonera_vchat_filters1.yml new file mode 100644 index 0000000000..4eb03e62f1 --- /dev/null +++ b/html/changelogs/atermonera_vchat_filters1.yml @@ -0,0 +1,5 @@ +author: Atermonera +delete-after: True +changes: + - rscadd: "Added Combat Logs filter category, to filter messages from things hitting you. This category will also eat up most other messages that are red and bold, please report any such messages that aren't specifically related to punching things." + - rscadd: "Added categories for sorting various types of admin logs." diff --git a/vorestation.dme b/vorestation.dme index 7515d44cbd..65b157301b 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1494,6 +1494,7 @@ #include "code\modules\admin\admin_ranks.dm" #include "code\modules\admin\admin_secrets.dm" #include "code\modules\admin\admin_tools.dm" +#include "code\modules\admin\admin_verb_lists.dm" #include "code\modules\admin\admin_verbs.dm" #include "code\modules\admin\banjob.dm" #include "code\modules\admin\ckey_vr.dm"