mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 09:03:23 +01:00
READY
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
admin = 1
|
||||
|
||||
//Guest Checking
|
||||
if(!GLOB.guests_allowed && IsGuestKey(key))
|
||||
if(GLOB.configuration.general.guest_ban && IsGuestKey(key))
|
||||
log_adminwarn("Failed Login: [key] [computer_id] [address] - Guests not allowed")
|
||||
// message_admins("<span class='notice'>Failed Login: [key] - Guests not allowed</span>")
|
||||
INVOKE_ASYNC(GLOBAL_PROC, .proc/log_connection, ckey(key), address, computer_id, CONNECTION_TYPE_DROPPED_BANNED)
|
||||
@@ -38,13 +38,13 @@
|
||||
if(check_ipintel && GLOB.configuration.ipintel.contact_email && GLOB.configuration.ipintel.whitelist_mode && ipintel_is_banned(key, address))
|
||||
log_adminwarn("Failed Login: [key] [computer_id] [address] - Proxy/VPN")
|
||||
var/mistakemessage = ""
|
||||
if(GLOB?.configuration?.url.banappeals_url)
|
||||
if(GLOB.configuration.url.banappeals_url)
|
||||
mistakemessage = "\nIf you have to use one, request whitelisting at: [GLOB.configuration.url.banappeals_url]"
|
||||
INVOKE_ASYNC(GLOBAL_PROC, .proc/log_connection, ckey(key), address, computer_id, CONNECTION_TYPE_DROPPED_IPINTEL)
|
||||
return list("reason"="using proxy or vpn", "desc"="\nReason: Proxies/VPNs are not allowed here. [mistakemessage]")
|
||||
|
||||
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
//Ban Checking
|
||||
. = CheckBan(ckey(key), computer_id, address)
|
||||
if(.)
|
||||
@@ -116,7 +116,7 @@
|
||||
expires = " The ban is for [duration] minutes and expires on [expiration] (server time)."
|
||||
else
|
||||
var/appealmessage = ""
|
||||
if(GLOB?.configuration?.url.banappeals_url)
|
||||
if(GLOB.configuration.url.banappeals_url)
|
||||
appealmessage = " You may appeal it at <a href='[GLOB.configuration.url.banappeals_url]'>[GLOB.configuration.url.banappeals_url]</a>."
|
||||
expires = " This ban does not expire automatically and must be appealed.[appealmessage]"
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ GLOBAL_PROTECT(banlist_savefile) // Obvious reasons
|
||||
|
||||
. = list()
|
||||
var/appeal
|
||||
if(GLOB?.configuration?.url.banappeals_url)
|
||||
if(GLOB.configuration.url.banappeals_url)
|
||||
appeal = "\nFor more information on your ban, or to appeal, head to <a href='[GLOB.configuration.url.banappeals_url]'>[GLOB.configuration.url.banappeals_url]</a>"
|
||||
GLOB.banlist_savefile.cd = "/base"
|
||||
if( "[ckey][id]" in GLOB.banlist_savefile.dir )
|
||||
|
||||
+19
-19
@@ -91,8 +91,8 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
else
|
||||
body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\] "
|
||||
body += "\[<A href='?_src_=holder;getplaytimewindow=[M.UID()]'>" + M.client.get_exp_type(EXP_TYPE_CREW) + " as [EXP_TYPE_CREW]</a>\]"
|
||||
body += "<br>BYOND account registration date: [M.client.byondacc_date || "ERROR"] [M.client.byondacc_age <= config.byond_account_age_threshold ? "<b>" : ""]([M.client.byondacc_age] days old)[M.client.byondacc_age <= config.byond_account_age_threshold ? "</b>" : ""]"
|
||||
body += "<br>Global Ban DB Lookup: [GLOB?.configuration?.url.centcom_ban_db_url ? "<a href='?_src_=holder;open_ccbdb=[M.client.ckey]'>Lookup</a>" : "<i>Disabled</i>"]"
|
||||
body += "<br>BYOND account registration date: [M.client.byondacc_date || "ERROR"] [M.client.byondacc_age <= GLOB.configuration?.general.byond_account_age_threshold ? "<b>" : ""]([M.client.byondacc_age] days old)[M.client.byondacc_age <= GLOB.configuration.general.byond_account_age_threshold ? "</b>" : ""]"
|
||||
body += "<br>Global Ban DB Lookup: [GLOB.configuration?.url.centcom_ban_db_url ? "<a href='?_src_=holder;open_ccbdb=[M.client.ckey]'>Lookup</a>" : "<i>Disabled</i>"]"
|
||||
|
||||
body += "<br>"
|
||||
|
||||
@@ -127,7 +127,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
body += "<A href='?_src_=holder;appearanceban=[M.UID()];dbbanaddckey=[M.ckey]'>Appearance Ban</A> | "
|
||||
body += "<A href='?_src_=holder;shownoteckey=[M.ckey]'>Notes</A> | "
|
||||
body += "<A href='?_src_=holder;viewkarma=[M.ckey]'>View Karma</A> | "
|
||||
if(GLOB?.configuration?.url.forum_playerinfo_url)
|
||||
if(GLOB.configuration.url.forum_playerinfo_url)
|
||||
body += "<A href='?_src_=holder;webtools=[M.ckey]'>WebInfo</A> | "
|
||||
if(M.client)
|
||||
if(check_watchlist(M.client.ckey))
|
||||
@@ -462,8 +462,8 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.looc_allowed = !(config.looc_allowed)
|
||||
if(config.looc_allowed)
|
||||
GLOB.looc_enabled = !(GLOB.looc_enabled)
|
||||
if(GLOB.looc_enabled)
|
||||
to_chat(world, "<B>The LOOC channel has been globally enabled!</B>")
|
||||
else
|
||||
to_chat(world, "<B>The LOOC channel has been globally disabled!</B>")
|
||||
@@ -478,8 +478,8 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.dsay_allowed = !(config.dsay_allowed)
|
||||
if(config.dsay_allowed)
|
||||
GLOB.dsay_enabled = !(GLOB.dsay_enabled)
|
||||
if(GLOB.dsay_enabled)
|
||||
to_chat(world, "<B>Deadchat has been globally enabled!</B>")
|
||||
else
|
||||
to_chat(world, "<B>Deadchat has been globally disabled!</B>")
|
||||
@@ -495,7 +495,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.dooc_allowed = !( config.dooc_allowed )
|
||||
GLOB.dooc_enabled = !(GLOB.dooc_enabled)
|
||||
log_admin("[key_name(usr)] toggled Dead OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Dead OOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -508,7 +508,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.disable_ooc_emoji = !(config.disable_ooc_emoji)
|
||||
GLOB.configuration.general.enable_ooc_emoji = !(GLOB.configuration.general.enable_ooc_emoji)
|
||||
log_admin("[key_name(usr)] toggled OOC Emoji.")
|
||||
message_admins("[key_name_admin(usr)] toggled OOC Emoji.", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle OOC Emoji")
|
||||
@@ -525,7 +525,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
alert("Unable to start the game as it is not set up.")
|
||||
return
|
||||
|
||||
if(config.start_now_confirmation)
|
||||
if(GLOB.configuration.general.start_now_confirmation)
|
||||
if(alert(usr, "This is a live server. Are you sure you want to start now?", "Start game", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
@@ -587,13 +587,13 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
GLOB.abandon_allowed = !( GLOB.abandon_allowed )
|
||||
if(GLOB.abandon_allowed)
|
||||
GLOB.configuration.general.respawn_enabled = !(GLOB.configuration.general.respawn_enabled)
|
||||
if(GLOB.configuration.general.respawn_enabled)
|
||||
to_chat(world, "<B>You may now respawn.</B>")
|
||||
else
|
||||
to_chat(world, "<B>You may no longer respawn :(</B>")
|
||||
message_admins("[key_name_admin(usr)] toggled respawn to [GLOB.abandon_allowed ? "On" : "Off"].", 1)
|
||||
log_admin("[key_name(usr)] toggled respawn to [GLOB.abandon_allowed ? "On" : "Off"].")
|
||||
to_chat(world, "<B>You may no longer respawn</B>")
|
||||
message_admins("[key_name_admin(usr)] toggled respawn to [GLOB.configuration.general.respawn_enabled ? "On" : "Off"].", 1)
|
||||
log_admin("[key_name(usr)] toggled respawn to [GLOB.configuration.general.respawn_enabled ? "On" : "Off"].")
|
||||
world.update_status()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Respawn") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -725,13 +725,13 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
GLOB.guests_allowed = !( GLOB.guests_allowed )
|
||||
if(!( GLOB.guests_allowed ))
|
||||
GLOB.configuration.general.guest_ban = !(GLOB.configuration?.general.guest_ban)
|
||||
if(GLOB.configuration.general.guest_ban)
|
||||
to_chat(world, "<B>Guests may no longer enter the game.</B>")
|
||||
else
|
||||
to_chat(world, "<B>Guests may now enter the game.</B>")
|
||||
log_admin("[key_name(usr)] toggled guests game entering [GLOB.guests_allowed ? "" : "dis"]allowed.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] toggled guests game entering [GLOB.guests_allowed ? "" : "dis"]allowed.</span>", 1)
|
||||
log_admin("[key_name(usr)] toggled guests game entering [GLOB.configuration?.general.guest_ban ? "dis" : ""]allowed.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] toggled guests game entering [GLOB.configuration?.general.guest_ban ? "dis" : ""]allowed.</span>", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Guests") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/output_ai_laws()
|
||||
|
||||
@@ -137,7 +137,6 @@ GLOBAL_LIST_INIT(admin_verbs_server, list(
|
||||
/client/proc/toggle_antagHUD_restrictions,
|
||||
/client/proc/set_ooc,
|
||||
/client/proc/reset_ooc,
|
||||
/client/proc/toggledrones
|
||||
))
|
||||
GLOBAL_LIST_INIT(admin_verbs_debug, list(
|
||||
/client/proc/cmd_admin_list_open_jobs,
|
||||
@@ -395,7 +394,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
holder.unbanpanel()
|
||||
else
|
||||
holder.DB_ban_panel()
|
||||
@@ -758,13 +757,13 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
if(config)
|
||||
if(GLOB.configuration.logging.href_logging)
|
||||
GLOB.configuration.logging.href_logging = FALSE
|
||||
to_chat(src, "<b>Stopped logging hrefs</b>")
|
||||
else
|
||||
GLOB.configuration.logging.href_logging = TRUE
|
||||
to_chat(src, "<b>Started logging hrefs</b>")
|
||||
// Why would we ever turn this off?
|
||||
if(GLOB.configuration.logging.href_logging)
|
||||
GLOB.configuration.logging.href_logging = FALSE
|
||||
to_chat(src, "<b>Stopped logging hrefs</b>")
|
||||
else
|
||||
GLOB.configuration.logging.href_logging = TRUE
|
||||
to_chat(src, "<b>Started logging hrefs</b>")
|
||||
|
||||
/client/proc/check_ai_laws()
|
||||
set name = "Check AI Laws"
|
||||
@@ -941,17 +940,6 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
else
|
||||
to_chat(usr, "You now will get admin ticket messages.")
|
||||
|
||||
/client/proc/toggledrones()
|
||||
set name = "Toggle Maintenance Drones"
|
||||
set category = "Server"
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
config.allow_drone_spawn = !(config.allow_drone_spawn)
|
||||
log_admin("[key_name(usr)] has [config.allow_drone_spawn ? "enabled" : "disabled"] maintenance drones.")
|
||||
message_admins("[key_name_admin(usr)] has [config.allow_drone_spawn ? "enabled" : "disabled"] maintenance drones.")
|
||||
|
||||
/client/proc/toggledebuglogs()
|
||||
set name = "Toggle Debug Log Messages"
|
||||
set category = "Preferences"
|
||||
|
||||
@@ -40,8 +40,9 @@ DEBUG
|
||||
appearance_loadbanfile()
|
||||
*/
|
||||
// AA 2020-11-25: This entire proc isnt even called. What the actual fuck.
|
||||
// AA 2021-05-23: This entire proc STILL isnt even called. I am going to screan.
|
||||
/proc/appearance_loadbanfile()
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
var/savefile/S=new("data/appearance_full.ban")
|
||||
S["keys[0]"] >> GLOB.appearance_keylist
|
||||
log_admin("Loading appearance_rank")
|
||||
@@ -53,7 +54,7 @@ DEBUG
|
||||
else
|
||||
if(!SSdbcore.IsConnected())
|
||||
log_world("Database connection failed. Reverting to the legacy ban system.")
|
||||
config.ban_legacy_system = 1
|
||||
GLOB.configuration.general.use_database_bans = FALSE
|
||||
appearance_loadbanfile()
|
||||
return
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
return
|
||||
GLOB.jobban_keylist.Add(text("[M.ckey] - [rank] ## [reason]"))
|
||||
jobban_assoc_insert(M.ckey, rank, reason)
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
jobban_savebanfile()
|
||||
|
||||
/proc/jobban_client_fullban(ckey, rank)
|
||||
@@ -25,7 +25,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
return
|
||||
GLOB.jobban_keylist.Add(text("[ckey] - [rank]"))
|
||||
jobban_assoc_insert(ckey, rank)
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
jobban_savebanfile()
|
||||
|
||||
//returns a reason if M is banned from rank, returns 0 otherwise
|
||||
@@ -33,7 +33,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
if(!M || !rank)
|
||||
return 0
|
||||
|
||||
if(config.guest_jobban && guest_jobbans(rank))
|
||||
if(GLOB.configuration.jobs.guest_job_ban && guest_jobbans(rank))
|
||||
if(IsGuestKey(M.key))
|
||||
return "Guest Job-ban"
|
||||
|
||||
@@ -46,7 +46,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
if(!ckey || !rank)
|
||||
return null
|
||||
|
||||
if(config.guest_jobban && guest_jobbans(rank))
|
||||
if(GLOB.configuration.jobs.guest_job_ban && guest_jobbans(rank))
|
||||
if(IsGuestKey(ckey))
|
||||
return "Guest Job-ban"
|
||||
|
||||
@@ -56,7 +56,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
return null
|
||||
|
||||
/proc/jobban_loadbanfile()
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
var/savefile/S=new("data/job_full.ban")
|
||||
S["keys[0]"] >> GLOB.jobban_keylist
|
||||
log_admin("Loading jobban_rank")
|
||||
@@ -74,7 +74,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
else
|
||||
if(!SSdbcore.IsConnected())
|
||||
log_world("Database connection failed. Reverting to the legacy ban system.")
|
||||
config.ban_legacy_system = 1
|
||||
GLOB.configuration.general.use_database_bans = FALSE
|
||||
jobban_loadbanfile()
|
||||
return
|
||||
|
||||
@@ -136,7 +136,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
else
|
||||
log_runtime(EXCEPTION("Failed to remove malformed job ban from associative list: [X]"))
|
||||
GLOB.jobban_keylist.Remove(GLOB.jobban_keylist[i])
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
jobban_savebanfile()
|
||||
return 1
|
||||
return 0
|
||||
@@ -148,7 +148,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
|
||||
if(!client || !ckey)
|
||||
return
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
//using the legacy .txt ban system
|
||||
to_chat(src, "The server is using the legacy ban system. Ask an administrator for help!")
|
||||
|
||||
@@ -186,7 +186,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
qdel(select_query)
|
||||
|
||||
if(is_actually_banned)
|
||||
if(GLOB?.configuration?.url.banappeals_url)
|
||||
if(GLOB.configuration.url.banappeals_url)
|
||||
to_chat(src, "<span class='warning'>You can appeal the bans at: [GLOB.configuration.url.banappeals_url]</span>")
|
||||
else
|
||||
to_chat(src, "<span class='warning'>You have no active jobbans!</span>")
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
/datum/admins/proc/create_ccbdb_lookup(ckey)
|
||||
// Bail if disabled
|
||||
if(!GLOB?.configuration?.url.centcom_ban_db_url)
|
||||
if(!GLOB.configuration.url.centcom_ban_db_url)
|
||||
to_chat(usr, "<span class='warning'>The CentCom Ban DB lookup is disabled. Please inform a maintainer or server host.</span>")
|
||||
return
|
||||
// Bail if no ckey is supplied
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
adminckey = ckey(adminckey)
|
||||
|
||||
if(!server)
|
||||
if(config && config.server_name)
|
||||
server = config.server_name
|
||||
if(GLOB.configuration.general.server_name)
|
||||
server = GLOB.configuration.general.server_name
|
||||
|
||||
// Force cast this to 1/0 incase someone tries to feed bad data
|
||||
automated = !!automated
|
||||
|
||||
+10
-15
@@ -541,7 +541,7 @@
|
||||
to_chat(M, "<span class='warning'><big><b>You have been appearance banned by [usr.client.ckey].</b></big></span>")
|
||||
to_chat(M, "<span class='danger'>The reason is: [reason]</span>")
|
||||
to_chat(M, "<span class='warning'>Appearance ban can be lifted only upon request.</span>")
|
||||
if(GLOB?.configuration?.url.banappeals_url)
|
||||
if(GLOB.configuration.url.banappeals_url)
|
||||
to_chat(M, "<span class='warning'>To try to resolve this matter head to [GLOB.configuration.url.banappeals_url]</span>")
|
||||
else
|
||||
to_chat(M, "<span class='warning'>No ban appeals URL has been set.</span>")
|
||||
@@ -880,7 +880,7 @@
|
||||
if(notbannedlist.len) //at least 1 unbanned job exists in joblist so we have stuff to ban.
|
||||
switch(alert("Temporary Ban of [M.ckey]?",,"Yes","No", "Cancel"))
|
||||
if("Yes")
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
to_chat(usr, "<span class='warning'>Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban.</span>")
|
||||
return
|
||||
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
|
||||
@@ -933,7 +933,7 @@
|
||||
//Unbanning joblist
|
||||
//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)
|
||||
if(GLOB.configuration.general.use_database_bans)
|
||||
to_chat(usr, "<span class='warning'>Unfortunately, database based unbanning cannot be done through this panel</span>")
|
||||
DB_ban_panel(M.ckey)
|
||||
return
|
||||
@@ -1008,7 +1008,7 @@
|
||||
|
||||
else if(href_list["webtools"])
|
||||
var/target_ckey = href_list["webtools"]
|
||||
if(GLOB?.configuration?.url.forum_playerinfo_url)
|
||||
if(GLOB.configuration.url.forum_playerinfo_url)
|
||||
var/url_to_open = "[GLOB.configuration.url.forum_playerinfo_url][target_ckey]"
|
||||
if(alert("Open [url_to_open]",,"Yes","No")=="Yes")
|
||||
usr.client << link(url_to_open)
|
||||
@@ -1091,7 +1091,7 @@
|
||||
to_chat(M, "<span class='warning'>This ban does not expire automatically and must be appealed.</span>")
|
||||
if(M.client)
|
||||
M.client.link_forum_account(TRUE)
|
||||
if(GLOB?.configuration?.url.banappeals_url)
|
||||
if(GLOB.configuration.url.banappeals_url)
|
||||
to_chat(M, "<span class='warning'>To try to resolve this matter head to [GLOB.configuration.url.banappeals_url]</span>")
|
||||
else
|
||||
to_chat(M, "<span class='warning'>No ban appeals URL has been set.</span>")
|
||||
@@ -3019,21 +3019,16 @@
|
||||
if("togglebombcap")
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Bomb Cap")
|
||||
|
||||
var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be between 4 and 128)", "New Bomb Cap", GLOB.max_ex_light_range) as num|null
|
||||
var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be between 4 and 128)", "New Bomb Cap", GLOB.configuration.general.bomb_cap) as num|null
|
||||
if(newBombCap < 4)
|
||||
return
|
||||
if(newBombCap > 128)
|
||||
newBombCap = 128
|
||||
|
||||
GLOB.max_ex_devastation_range = round(newBombCap/4)
|
||||
GLOB.max_ex_heavy_range = round(newBombCap/2)
|
||||
GLOB.max_ex_light_range = newBombCap
|
||||
//I don't know why these are their own variables, but fuck it, they are.
|
||||
GLOB.max_ex_flash_range = newBombCap
|
||||
GLOB.max_ex_flame_range = newBombCap
|
||||
GLOB.configuration.general.bomb_cap = newBombCap
|
||||
|
||||
message_admins("<span class='boldannounce'>[key_name_admin(usr)] changed the bomb cap to [GLOB.max_ex_devastation_range], [GLOB.max_ex_heavy_range], [GLOB.max_ex_light_range]</span>")
|
||||
log_admin("[key_name(usr)] changed the bomb cap to [GLOB.max_ex_devastation_range], [GLOB.max_ex_heavy_range], [GLOB.max_ex_light_range]")
|
||||
message_admins("<span class='boldannounce'>[key_name_admin(usr)] changed the bomb cap to [GLOB.configuration.general.bomb_cap / 4], [GLOB.configuration.general.bomb_cap / 2], [GLOB.configuration.general.bomb_cap]</span>")
|
||||
log_admin("[key_name(usr)] changed the bomb cap to [GLOB.configuration.general.bomb_cap / 4], [GLOB.configuration.general.bomb_cap / 2], [GLOB.configuration.general.bomb_cap]")
|
||||
|
||||
if("flicklights")
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Flicker Lights")
|
||||
@@ -3310,7 +3305,7 @@
|
||||
var/val = alert(usr, "What do you want to set night shift to? This will override the automatic system until set to automatic again.", "Night Shift", "On", "Off", "Automatic")
|
||||
switch(val)
|
||||
if("Automatic")
|
||||
if(config.enable_night_shifts)
|
||||
if(GLOB.configuration.general.enable_night_shifts)
|
||||
SSnightshift.can_fire = TRUE
|
||||
SSnightshift.fire()
|
||||
else
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
C.adminhelped = 0
|
||||
|
||||
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
|
||||
if(config.popup_admin_pm)
|
||||
if(GLOB.configuration.general.popup_admin_pm)
|
||||
spawn(0) //so we don't hold the caller proc up
|
||||
var/sender = src
|
||||
var/sendername = key
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
return
|
||||
|
||||
if(istype(O,/obj/singularity))
|
||||
if(config.forbid_singulo_possession)
|
||||
if(GLOB.configuration.general.forbid_singulo_possession) // I love how this needs to exist
|
||||
to_chat(usr, "It is forbidden to possess singularities.")
|
||||
return
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
|
||||
/proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
if(automute)
|
||||
if(!config.automute_on)
|
||||
if(!GLOB.configuration.general.enable_auto_mute)
|
||||
return
|
||||
else
|
||||
if(!usr || !usr.client)
|
||||
@@ -276,24 +276,24 @@
|
||||
return
|
||||
|
||||
var/action=""
|
||||
if(config.antag_hud_allowed)
|
||||
if(GLOB.configuration.general.allow_antag_hud)
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
if(!g.client.holder) //Remove the verb from non-admin ghosts
|
||||
g.verbs -= /mob/dead/observer/verb/toggle_antagHUD
|
||||
if(g.antagHUD)
|
||||
g.antagHUD = FALSE // Disable it on those that have it enabled
|
||||
g.has_enabled_antagHUD = 2 // We'll allow them to respawn
|
||||
to_chat(g, "<span class='danger'>The Administrator has disabled AntagHUD </span>")
|
||||
config.antag_hud_allowed = 0
|
||||
to_chat(g, "<span class='danger'>The Administrators have disabled AntagHUD </span>")
|
||||
GLOB.configuration.general.allow_antag_hud = FALSE
|
||||
to_chat(src, "<span class='danger'>AntagHUD usage has been disabled</span>")
|
||||
action = "disabled"
|
||||
else
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
if(!g.client.holder) // Add the verb back for all non-admin ghosts
|
||||
g.verbs += /mob/dead/observer/verb/toggle_antagHUD
|
||||
to_chat(g, "<span class='boldnotice'>The Administrator has enabled AntagHUD </span>")// Notify all observers they can now use AntagHUD
|
||||
to_chat(g, "<span class='boldnotice'>The Administrators have enabled AntagHUD </span>")// Notify all observers they can now use AntagHUD
|
||||
|
||||
config.antag_hud_allowed = 1
|
||||
GLOB.configuration.general.allow_antag_hud = TRUE
|
||||
action = "enabled"
|
||||
to_chat(src, "<span class='boldnotice'>AntagHUD usage has been enabled</span>")
|
||||
|
||||
@@ -310,11 +310,11 @@
|
||||
return
|
||||
|
||||
var/action=""
|
||||
if(config.antag_hud_restricted)
|
||||
if(GLOB.configuration.general.restrict_antag_hud_rejoin)
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
to_chat(g, "<span class='boldnotice'>The administrator has lifted restrictions on joining the round if you use AntagHUD</span>")
|
||||
action = "lifted restrictions"
|
||||
config.antag_hud_restricted = 0
|
||||
GLOB.configuration.general.restrict_antag_hud_rejoin = FALSE
|
||||
to_chat(src, "<span class='boldnotice'>AntagHUD restrictions have been lifted</span>")
|
||||
else
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
@@ -323,7 +323,7 @@
|
||||
g.antagHUD = FALSE
|
||||
g.has_enabled_antagHUD = 0
|
||||
action = "placed restrictions"
|
||||
config.antag_hud_restricted = 1
|
||||
GLOB.configuration.general.restrict_antag_hud_rejoin = TRUE
|
||||
to_chat(src, "<span class='danger'>AntagHUD restrictions have been enabled</span>")
|
||||
|
||||
log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD")
|
||||
@@ -1029,7 +1029,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(H.client == null || H.stat == DEAD) // No clientless or dead
|
||||
continue
|
||||
mins_afk = round(H.client.inactivity / 600)
|
||||
if(mins_afk < config.list_afk_minimum)
|
||||
if(mins_afk < 5)
|
||||
continue
|
||||
if(H.job)
|
||||
job_string = H.job
|
||||
|
||||
Reference in New Issue
Block a user