From 61704cba70572001c4091c1d6c39b279aa3cff1a Mon Sep 17 00:00:00 2001 From: BongaTheProto <93835010+BongaTheProto@users.noreply.github.com> Date: Thu, 6 Jan 2022 18:56:03 -0500 Subject: [PATCH] Verbs ready these are the base verbs --- code/modules/admin/admin_verbs.dm | 4 ++ .../code/modules/admin/chat_commands.dm | 16 ++++++++ modular_splurt/code/_globalvars/lists/mobs.dm | 1 + .../code/modules/admin/verbs/discordbunker.dm | 41 ++++++++++++++++++- tgstation.dme | 2 + 5 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 modular_sand/code/modules/admin/chat_commands.dm create mode 100644 modular_splurt/code/_globalvars/lists/mobs.dm diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 51bf7bd220..eabc3a9ec5 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -86,6 +86,8 @@ GLOBAL_PROTECT(admin_verbs_admin) /client/proc/admin_cmd_remove_ghost_respawn_timer, //CIT /client/proc/addbunkerbypass, //CIT /client/proc/revokebunkerbypass, //CIT + /client/proc/adddiscordbypass, //SPLURT + /client/proc/revokediscordbypass, //SPLURT /datum/admins/proc/open_borgopanel ) GLOBAL_LIST_INIT(admin_verbs_ban, list(/client/proc/unban_panel, /client/proc/DB_ban_panel, /client/proc/stickybanpanel)) @@ -274,6 +276,8 @@ GLOBAL_LIST_INIT(admin_verbs_hideable, list( /client/proc/discordbunker, // SPLURT /client/proc/addbunkerbypass, //CIT /client/proc/revokebunkerbypass, //CIT + /client/proc/adddiscordbypass, //SPLURT + /client/proc/revokediscordbypass, //SPLURT // /client/proc/toggle_interviews, /client/proc/admin_change_sec_level, /client/proc/toggle_nuke, diff --git a/modular_sand/code/modules/admin/chat_commands.dm b/modular_sand/code/modules/admin/chat_commands.dm new file mode 100644 index 0000000000..0cd8ad67eb --- /dev/null +++ b/modular_sand/code/modules/admin/chat_commands.dm @@ -0,0 +1,16 @@ +//Idk why cit never added this +/datum/tgs_chat_command/revokebunkerbypass + name = "unwhitelist" + help_text = "unwhitelist " + admin_only = TRUE + +/datum/tgs_chat_command/revokebunkerbypass/Run(datum/tgs_chat_user/sender, params) + if(!CONFIG_GET(flag/sql_enabled)) + return "The Database is not enabled!" + + GLOB.bunker_passthrough -= ckey(params) + SSpersistence.SavePanicBunker() + log_admin("[sender.friendly_name] has removed [params] from the current round's bunker bypass list.") + message_admins("[sender.friendly_name] has removed [params] from the current round's bunker bypass list.") + return "[params] has been removed from the current round's bunker bypass list." + diff --git a/modular_splurt/code/_globalvars/lists/mobs.dm b/modular_splurt/code/_globalvars/lists/mobs.dm new file mode 100644 index 0000000000..92a3c83791 --- /dev/null +++ b/modular_splurt/code/_globalvars/lists/mobs.dm @@ -0,0 +1 @@ +GLOBAL_LIST_EMPTY(discord_passthrough) diff --git a/modular_splurt/code/modules/admin/verbs/discordbunker.dm b/modular_splurt/code/modules/admin/verbs/discordbunker.dm index c0df74d046..46d5db257b 100644 --- a/modular_splurt/code/modules/admin/verbs/discordbunker.dm +++ b/modular_splurt/code/modules/admin/verbs/discordbunker.dm @@ -1,4 +1,4 @@ -/client/proc/discordbunker() //TODO: add bunker bypass stuffs +/client/proc/discordbunker() set category = "Server" set name = "Toggle Discord Bunker" if(!SSdbcore.IsConnected()) @@ -12,3 +12,42 @@ message_admins("[key_name_admin(usr)] has toggled the Discord Bunker, it is now [new_dbun ? "enabled" : "disabled"].") SSblackbox.record_feedback("nested tally", "discord_toggle", 1, list("Toggle Panic Bunker", "[new_dbun ? "Enabled" : "Disabled"]")) send2adminchat("Discord Bunker", "[key_name(usr)] has toggled the Panic Bunker, it is now [new_dbun ? "enabled" : "disabled"].") + +/client/proc/adddiscordbypass(ckeytobypass as text) // In case someone's too lazy to verify on discord + set category = "Special Verbs" + set name = "Add Discord Bypass" + set desc = "Allows a given ckey to connect through the discord bunker for the round even if they haven't verified yet." + if(!SSdbcore.IsConnected()) + to_chat(usr, "The Database is not connected!") + return + if(!SSdiscord) + to_chat(usr, "The discord subsystem hasn't initialized yet!") + return + if(!CONFIG_GET(flag/need_discord_to_join)) + to_chat(usr, "The Discord Bunker is deactivated!") + return + + GLOB.discord_passthrough |= ckey(ckeytobypass) + GLOB.discord_passthrough[ckey(ckeytobypass)] = world.realtime + log_admin("[key_name(usr)] has added [ckeytobypass] to the current round's discord bypass list.") + message_admins("[key_name_admin(usr)] has added [ckeytobypass] to the current round's discord bypass list.") + send2adminchat("Discord Bunker", "[key_name(usr)] has added [ckeytobypass] to the current round's discord bypass list.") + +/client/proc/revokediscordbypass(ckeytobypass as text) // In case the person you let bypass turned out to be a griefer + set category = "Special Verbs" + set name = "Revoke Discord Bypass" + set desc = "Revoke's a ckey's permission to bypass the discord bunker for a given round." + if(!SSdbcore.IsConnected()) + to_chat(usr, "The Database is not connected!") + return + if(!SSdiscord) + to_chat(usr, "The discord subsystem hasn't initialized yet!") + return + if(!CONFIG_GET(flag/need_discord_to_join)) + to_chat(usr, "The Discord Bunker is deactivated!") + return + + GLOB.discord_passthrough -= ckey(ckeytobypass) + log_admin("[key_name(usr)] has removed [ckeytobypass] from the current round's discord bypass list.") + message_admins("[key_name_admin(usr)] has removed [ckeytobypass] from the current round's discord bypass list.") + send2adminchat("Discord Bunker", "[key_name(usr)] has removed [ckeytobypass] from the current round's discord bypass list.") diff --git a/tgstation.dme b/tgstation.dme index 2028569bb5..5dde94b5e6 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3957,6 +3957,7 @@ #include "modular_sand\code\game\turfs\simulated\floor\plastitanium_floor.dm" #include "modular_sand\code\game\turfs\simulated\floor\plating.dm" #include "modular_sand\code\game\turfs\simulated\floor\titanium_floor.dm" +#include "modular_sand\code\modules\admin\chat_commands.dm" #include "modular_sand\code\modules\admin\verbs\fix_air.dm" #include "modular_sand\code\modules\arousal\arousal.dm" #include "modular_sand\code\modules\arousal\creampie.dm" @@ -4162,6 +4163,7 @@ #include "modular_splurt\code\__HELPERS\icons.dm" #include "modular_splurt\code\_globalvars\lists\global_lewd.dm" #include "modular_splurt\code\_globalvars\lists\mapping.dm" +#include "modular_splurt\code\_globalvars\lists\mobs.dm" #include "modular_splurt\code\_globalvars\lists\objects.dm" #include "modular_splurt\code\controllers\configuration\entries\splurt_discord.dm" #include "modular_splurt\code\controllers\configuration\entries\splurt_fetish_content.dm"