tgchat day zero changes (#23872)

* tgchat day zero changes

* Update code/game/verbs/ooc.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

---------

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
GDN
2024-01-21 22:07:57 +00:00
committed by GitHub
co-authored by Henri215
parent 54a144301d
commit 0b8c196f67
67 changed files with 141 additions and 223 deletions
+2 -2
View File
@@ -706,7 +706,7 @@ GLOBAL_LIST_INIT(view_runtimes_verbs, list(
// Do a little check here
if(GLOB.configuration.system.is_production && (GLOB.admin_ranks[rank] & R_ADMIN) && prefs._2fa_status == _2FA_DISABLED) // If they are an admin and their 2FA is disabled
to_chat(src,"<span class='boldannounce'><big>You do not have 2FA enabled. Admin verbs will be unavailable until you have enabled 2FA.</big></span>") // Very fucking obvious
to_chat(src,"<span class='boldannounceooc'><big>You do not have 2FA enabled. Admin verbs will be unavailable until you have enabled 2FA.</big></span>") // Very fucking obvious
return
D = new(rank, GLOB.admin_ranks[rank], ckey)
else
@@ -741,7 +741,7 @@ GLOBAL_LIST_INIT(view_runtimes_verbs, list(
var/client/check_client = GLOB.directory[ckey]
// Do a little check here
if(GLOB.configuration.system.is_production && (flags & R_ADMIN) && check_client.prefs._2fa_status == _2FA_DISABLED) // If they are an admin and their 2FA is disabled
to_chat(src,"<span class='boldannounce'><big>You do not have 2FA enabled. Admin verbs will be unavailable until you have enabled 2FA.</big></span>") // Very fucking obvious
to_chat(src,"<span class='boldannounceooc'><big>You do not have 2FA enabled. Admin verbs will be unavailable until you have enabled 2FA.</big></span>") // Very fucking obvious
qdel(admin_read)
return
D = new(admin_rank, flags, ckey)
+3 -3
View File
@@ -5,7 +5,7 @@
if(!check_rights(R_BAN)) return
if(!SSdbcore.IsConnected())
to_chat(usr, "<span class='boldannounce'>Database connection failure when attempting to make DB ban. Please freeze them and write their ckey in notepad, so they can be banned when the DB returns.</span>")
to_chat(usr, "<span class='boldannounceooc'>Database connection failure when attempting to make DB ban. Please freeze them and write their ckey in notepad, so they can be banned when the DB returns.</span>")
return
var/serverip = "[world.internet_address]:[world.port]"
@@ -198,7 +198,7 @@
if(!check_rights(R_BAN)) return
if(!SSdbcore.IsConnected())
to_chat(usr, "<span class='boldannounce'>Database connection failure when attempting to remove DB ban. Please remember to unban them at a later date!.</span>")
to_chat(usr, "<span class='boldannounceooc'>Database connection failure when attempting to remove DB ban. Please remember to unban them at a later date!.</span>")
return
var/bantype_str
@@ -394,7 +394,7 @@
return
if(!SSdbcore.IsConnected())
to_chat(usr, "<span class='boldannounce'>Database connection failure when attempting to remove DB ban. Please remember to unban them at a later date!.</span>")
to_chat(usr, "<span class='boldannounceooc'>Database connection failure when attempting to remove DB ban. Please remember to unban them at a later date!.</span>")
return
var/ban_number = 0 //failsafe
+5 -5
View File
@@ -17,7 +17,7 @@ GLOBAL_PROTECT(admin_datums) // This is protected because we dont want people ma
/datum/admins/New(initial_rank = "Temporary Admin", initial_rights = 0, ckey)
if(IsAdminAdvancedProcCall())
to_chat(usr, "<span class='boldannounce'>Admin rank creation blocked: Advanced ProcCall detected.</span>")
to_chat(usr, "<span class='boldannounceooc'>Admin rank creation blocked: Advanced ProcCall detected.</span>")
message_admins("[key_name(usr)] attempted to create a new admin rank via advanced proc-call")
log_admin("[key_name(usr)] attempted to edit feedback a new admin rank via advanced proc-call")
return
@@ -32,7 +32,7 @@ GLOBAL_PROTECT(admin_datums) // This is protected because we dont want people ma
/datum/admins/Destroy()
if(IsAdminAdvancedProcCall())
to_chat(usr, "<span class='boldannounce'>Admin rank deletion blocked: Advanced ProcCall detected.</span>")
to_chat(usr, "<span class='boldannounceooc'>Admin rank deletion blocked: Advanced ProcCall detected.</span>")
message_admins("[key_name(usr)] attempted to delete an admin rank via advanced proc-call")
log_admin("[key_name(usr)] attempted to delete an admin rank via advanced proc-call")
return
@@ -41,7 +41,7 @@ GLOBAL_PROTECT(admin_datums) // This is protected because we dont want people ma
/datum/admins/proc/associate(client/C)
if(IsAdminAdvancedProcCall())
to_chat(usr, "<span class='boldannounce'>Rank association blocked: Advanced ProcCall detected.</span>")
to_chat(usr, "<span class='boldannounceooc'>Rank association blocked: Advanced ProcCall detected.</span>")
message_admins("[key_name(usr)] attempted to associate an admin rank to a new client via advanced proc-call")
log_admin("[key_name(usr)] attempted to associate an admin rank to a new client via advanced proc-call")
return
@@ -54,7 +54,7 @@ GLOBAL_PROTECT(admin_datums) // This is protected because we dont want people ma
/datum/admins/proc/disassociate()
if(IsAdminAdvancedProcCall())
to_chat(usr, "<span class='boldannounce'>Rank disassociation blocked: Advanced ProcCall detected.</span>")
to_chat(usr, "<span class='boldannounceooc'>Rank disassociation blocked: Advanced ProcCall detected.</span>")
message_admins("[key_name(usr)] attempted to disassociate an admin rank from a client via advanced proc-call")
log_admin("[key_name(usr)] attempted to disassociate an admin rank from a client via advanced proc-call")
return
@@ -126,7 +126,7 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
/client/proc/deadmin()
if(IsAdminAdvancedProcCall())
to_chat(usr, "<span class='boldannounce'>Deadmin blocked: Advanced ProcCall detected.</span>")
to_chat(usr, "<span class='boldannounceooc'>Deadmin blocked: Advanced ProcCall detected.</span>")
message_admins("[key_name(usr)] attempted to de-admin a client via advanced proc-call")
log_admin("[key_name(usr)] attempted to de-admin a client via advanced proc-call")
return
+7 -28
View File
@@ -7,20 +7,14 @@ GLOBAL_VAR_INIT(nologevent, 0)
for(var/client/C in GLOB.admins)
if(R_ADMIN & C.holder.rights)
if(C.prefs && !(C.prefs.toggles & PREFTOGGLE_CHAT_NO_ADMINLOGS))
to_chat(C,
type = MESSAGE_TYPE_ADMINLOG,
html = msg,
confidential = TRUE)
to_chat(C, msg, MESSAGE_TYPE_ADMINLOG, confidential = TRUE)
/proc/msg_admin_attack(text, loglevel)
if(!GLOB.nologevent)
var/rendered = "<span class=\"admin\"><span class=\"prefix\">ATTACK:</span> <span class=\"message\">[text]</span></span>"
for(var/client/C in GLOB.admins)
if((C.holder.rights & R_ADMIN) && (C.prefs?.atklog <= loglevel))
to_chat(C,
type = MESSAGE_TYPE_ATTACKLOG,
html = rendered,
confidential = TRUE)
to_chat(C, rendered, MESSAGE_TYPE_ATTACKLOG, confidential = TRUE)
/**
* Sends a message to the staff able to see admin tickets
@@ -33,10 +27,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
for(var/client/C in GLOB.admins)
if(R_ADMIN & C.holder.rights)
if(important || (C.prefs && !(C.prefs.toggles & PREFTOGGLE_CHAT_NO_TICKETLOGS)))
to_chat(C,
type = MESSAGE_TYPE_ADMINPM,
html = msg,
confidential = TRUE)
to_chat(C, msg, MESSAGE_TYPE_ADMINPM, confidential = TRUE)
if(important)
if(C.prefs?.sound & SOUND_ADMINHELP)
SEND_SOUND(C, sound('sound/effects/adminhelp.ogg'))
@@ -53,10 +44,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
for(var/client/C in GLOB.admins)
if(check_rights(R_ADMIN | R_MENTOR | R_MOD, 0, C.mob))
if(important || (C.prefs && !(C.prefs.toggles & PREFTOGGLE_CHAT_NO_TICKETLOGS)))
to_chat(C,
type = MESSAGE_TYPE_MENTORCHAT,
html = msg,
confidential = TRUE)
to_chat(C, msg, MESSAGE_TYPE_MENTORCHAT, confidential = TRUE)
if(important)
if(C.prefs?.sound & SOUND_MENTORHELP)
SEND_SOUND(C, sound('sound/effects/adminhelp.ogg'))
@@ -68,21 +56,12 @@ GLOBAL_VAR_INIT(nologevent, 0)
for(var/mob/O in GLOB.mob_list)
if(O.ckey && O.ckey == ckey_to_find)
if(admin_to_notify)
to_chat(admin_to_notify,
type = MESSAGE_TYPE_ADMINLOG,
html = "<span class='warning'>admin_ban_mobsearch: Player [ckey_to_find] is now in mob [O]. Pulling data from new mob.</span>",
confidential = TRUE)
to_chat(admin_to_notify, "<span class='warning'>admin_ban_mobsearch: Player [ckey_to_find] is now in mob [O]. Pulling data from new mob.</span>", MESSAGE_TYPE_ADMINLOG, confidential = TRUE)
return O
if(admin_to_notify)
to_chat(admin_to_notify,
type = MESSAGE_TYPE_ADMINLOG,
html = "<span class='warning'>admin_ban_mobsearch: Player [ckey_to_find] does not seem to have any mob, anywhere. This is probably an error.</span>",
confidential = TRUE)
to_chat(admin_to_notify, "<span class='warning'>admin_ban_mobsearch: Player [ckey_to_find] does not seem to have any mob, anywhere. This is probably an error.</span>", MESSAGE_TYPE_ADMINLOG, confidential = TRUE)
else if(admin_to_notify)
to_chat(admin_to_notify,
type = MESSAGE_TYPE_ADMINLOG,
html = "<span class='warning'>admin_ban_mobsearch: No mob or ckey detected.</span>",
confidential = TRUE)
to_chat(admin_to_notify, "<span class='warning'>admin_ban_mobsearch: No mob or ckey detected.</span>", MESSAGE_TYPE_ADMINLOG, confidential = TRUE)
return M
///////////////////////////////////////////////////////////////////////////////////////////////Panels
@@ -140,7 +140,7 @@
/datum/admins/proc/log_admin_permission_modification(adm_ckey, new_permission)
if(IsAdminAdvancedProcCall())
to_chat(usr, "<span class='boldannounce'>Admin edit blocked: Advanced ProcCall detected.</span>")
to_chat(usr, "<span class='boldannounceooc'>Admin edit blocked: Advanced ProcCall detected.</span>")
message_admins("[key_name(usr)] attempted to edit admin ranks via advanced proc-call")
log_admin("[key_name(usr)] attempted to edit admin ranks via advanced proc-call")
return
+1 -1
View File
@@ -3,7 +3,7 @@
return
if(IsAdminAdvancedProcCall() && !sanitise_html)
// *sigh*
to_chat(usr, "<span class='boldannounce'>Unsanitized note add blocked: Advanced ProcCall detected.</span>")
to_chat(usr, "<span class='boldannounceooc'>Unsanitized note add blocked: Advanced ProcCall detected.</span>")
message_admins("[key_name(usr)] attempted to possibly inject HTML into notes via advanced proc-call")
log_admin("[key_name(usr)] attempted to possibly inject HTML into notes via advanced proc-call")
return
+1 -1
View File
@@ -2981,7 +2981,7 @@
GLOB.configuration.general.bomb_cap = newBombCap
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>")
message_admins("<span class='boldannounceooc'>[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")
+2 -8
View File
@@ -4,10 +4,7 @@
//handle muting and automuting
if(check_mute(ckey, MUTE_ADMINHELP))
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<font color='red'>Error: Admin-PM: You cannot send adminhelps (Muted).</font>",
confidential = TRUE)
to_chat(src, "<font color='red'>Error: Admin-PM: You cannot send adminhelps (Muted).</font>", MESSAGE_TYPE_ADMINPM, confidential = TRUE)
return
adminhelped = TRUE //Determines if they get the message to reply by clicking the name.
@@ -34,10 +31,7 @@
SStickets.newHelpRequest(src, msg) // Ahelp
//show it to the person adminhelping too
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='boldnotice'>[selected_type]</b>: [msg]</span>",
confidential = TRUE)
to_chat(src, "<span class='boldnotice'>[selected_type]</b>: [msg]</span>", MESSAGE_TYPE_ADMINPM, confidential = TRUE)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Adminhelp") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
switch(selected_type)
+1 -4
View File
@@ -242,10 +242,7 @@
GLOB.discord_manager.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "PM from [key_name(src)]: [html_decode(msg)]")
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = "<span class='pmsend'>PM to-<b>Discord Admins</b>: [msg]</span>",
confidential = TRUE)
to_chat(src, "<span class='pmsend'>PM to-<b>Discord Admins</b>: [msg]</span>", MESSAGE_TYPE_ADMINPM, confidential = TRUE)
log_admin("PM: [key_name(src)]->Discord: [msg]")
for(var/client/X in GLOB.admins)
+2 -8
View File
@@ -30,10 +30,7 @@
temp_message = replacetext(temp_message, "@[C.key]", "<font color='red'>@[C.key]</font>") // Same applies here. key and ckey.
temp_message = "<span class='emoji_enabled'>[temp_message]</span>"
to_chat(C,
type = MESSAGE_TYPE_ADMINCHAT,
html = "<span class='admin_channel'>ADMIN: <span class='name'>[key_name(usr, 1)]</span> ([admin_jump_link(mob)]): <span class='message'>[temp_message]</span></span>",
confidential = TRUE)
to_chat(C, "<span class='admin_channel'>ADMIN: <span class='name'>[key_name(usr, 1)]</span> ([admin_jump_link(mob)]): <span class='message'>[temp_message]</span></span>", MESSAGE_TYPE_ADMINCHAT, confidential = TRUE)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Asay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -79,10 +76,7 @@
else
display_name = holder.fakekey
msg = "<span class='emoji_enabled'>[msg]</span>"
to_chat(C,
type = MESSAGE_TYPE_MENTORCHAT,
html = "<span class='[check_rights(R_ADMIN, 0) ? "mentor_channel_admin" : "mentor_channel"]'>MENTOR: <span class='name'>[display_name]</span> ([admin_jump_link(mob)]): <span class='message'>[msg]</span></span>",
confidential = TRUE)
to_chat(C, "<span class='[check_rights(R_ADMIN, 0) ? "mentor_channel_admin" : "mentor_channel"]'>MENTOR: <span class='name'>[display_name]</span> ([admin_jump_link(mob)]): <span class='message'>[msg]</span></span>", MESSAGE_TYPE_MENTORCHAT, confidential = TRUE)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Msay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+1 -1
View File
@@ -141,7 +141,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
else if(target != world)
return call(target, procname)(arglist(arguments))
else
to_chat(usr, "<span class='boldannounce'>Call to world/proc/[procname] blocked: Advanced ProcCall detected.</span>")
to_chat(usr, "<span class='boldannounceooc'>Call to world/proc/[procname] blocked: Advanced ProcCall detected.</span>")
message_admins("[key_name(usr)] attempted to call world/proc/[procname] with arguments: [english_list(arguments)]")
log_admin("[key_name(usr)] attempted to call world/proc/[procname] with arguments: [english_list(arguments)]l")
+1 -1
View File
@@ -204,4 +204,4 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
message_admins("[key_name_admin(usr)] has set the next map to [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])")
log_admin("[key_name(usr)] has set the next map to [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])")
if(announce_to_players == "Yes")
to_chat(world, "<span class='boldannounce'>[key] has chosen the following map for next round: <font color='cyan'>[SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])</font></span>")
to_chat(world, "<span class='boldannounceooc'>[key] has chosen the following map for next round: <font color='cyan'>[SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])</font></span>")
+1 -1
View File
@@ -26,7 +26,7 @@
admins_to_ping += C
if(length(admins_to_ping) < 2) // All by yourself?
to_chat(usr, "<span class='boldannounce'>No other admins online to ping[de_admin_also == "Yes" ? ", including those that have used de-admin" : ""]!</span>")
to_chat(usr, "<span class='boldannounceooc'>No other admins online to ping[de_admin_also == "Yes" ? ", including those that have used de-admin" : ""]!</span>")
return
var/datum/asays/asay = new(usr.ckey, usr.client.holder.rank, msg, world.timeofday)
+1 -1
View File
@@ -43,7 +43,7 @@ GLOBAL_LIST_EMPTY(sounds_cache)
uploaded_sound.volume = 100 * M.client.prefs.get_channel_volume(CHANNEL_ADMIN)
var/this_uid = M.client.UID()
to_chat(M, "<span class='boldannounce'>[ckey] played <code>[S]</code> (<a href='?src=[this_uid];action=silenceSound'>SILENCE</a>) (<a href='?src=[this_uid];action=muteAdmin&a=[ckey]'>ALWAYS SILENCE THIS ADMIN</a>)</span>")
to_chat(M, "<span class='boldannounceic'>[ckey] played <code>[S]</code> (<a href='?src=[this_uid];action=silenceSound'>SILENCE</a>) (<a href='?src=[this_uid];action=muteAdmin&a=[ckey]'>ALWAYS SILENCE THIS ADMIN</a>)</span>")
SEND_SOUND(M, uploaded_sound)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Global Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!