mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
[MIRROR] Cleans up some unticked dm files (#11438)
Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
91bb52b6d4
commit
f7bef32db9
@@ -1,5 +0,0 @@
|
|||||||
|
|
||||||
///tgui tab portrait categories- they're the same across all portrait tguis.
|
|
||||||
#define TAB_LIBRARY 1
|
|
||||||
#define TAB_SECURE 2
|
|
||||||
#define TAB_PRIVATE 3
|
|
||||||
@@ -3,6 +3,9 @@ GLOBAL_DATUM_INIT(is_http_protocol, /regex, regex("^https?://"))
|
|||||||
|
|
||||||
GLOBAL_DATUM_INIT(is_valid_url, /regex, regex("((?:https://)\[-a-zA-Z0-9@:%._+~#=]{1,256}.\[-a-zA-Z0-9@:%._+~#=]{1,256}\\b(?:\[-a-zA-Z0-9@():%_+.,~#?&/=]*\[^.,!?:; ()<>{}\\[]\n\"'´`]))", "gm"))
|
GLOBAL_DATUM_INIT(is_valid_url, /regex, regex("((?:https://)\[-a-zA-Z0-9@:%._+~#=]{1,256}.\[-a-zA-Z0-9@:%._+~#=]{1,256}\\b(?:\[-a-zA-Z0-9@():%_+.,~#?&/=]*\[^.,!?:; ()<>{}\\[]\n\"'´`]))", "gm"))
|
||||||
|
|
||||||
|
//finds text strings recognized as links on discord. Mainly used to stop embedding.
|
||||||
|
GLOBAL_DATUM_INIT(has_discord_embeddable_links, /regex, regex("(https?://\[^\\s|<\]{2,})"))
|
||||||
|
|
||||||
//All < and > characters
|
//All < and > characters
|
||||||
GLOBAL_DATUM_INIT(angular_brackets, /regex, regex(@"[<>]", "g"))
|
GLOBAL_DATUM_INIT(angular_brackets, /regex, regex(@"[<>]", "g"))
|
||||||
|
|
||||||
|
|||||||
14
code/_helpers/chat.dm
Normal file
14
code/_helpers/chat.dm
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/**
|
||||||
|
* Asynchronously sends a message to TGS admin chat channels.
|
||||||
|
*
|
||||||
|
* category - The category of the mssage.
|
||||||
|
* message - The message to send.
|
||||||
|
*/
|
||||||
|
/proc/send2adminchat(category, message, embed_links = FALSE)
|
||||||
|
set waitfor = FALSE
|
||||||
|
|
||||||
|
category = replacetext(replacetext(category, "\proper", ""), "\improper", "")
|
||||||
|
message = replacetext(replacetext(message, "\proper", ""), "\improper", "")
|
||||||
|
if(!embed_links)
|
||||||
|
message = GLOB.has_discord_embeddable_links.Replace(replacetext(message, "`", ""), " ```$1``` ")
|
||||||
|
world.TgsTargetedChatBroadcast(new /datum/tgs_message_content("[category] | [message]"), TRUE)
|
||||||
@@ -235,9 +235,7 @@ SUBSYSTEM_DEF(ticker)
|
|||||||
|
|
||||||
var/list/adm = get_admin_counts()
|
var/list/adm = get_admin_counts()
|
||||||
var/list/allmins = adm["present"]
|
var/list/allmins = adm["present"]
|
||||||
// TODO: IMPLEMENT: send2adminchat("Server", "Round [GLOB.round_id ? "#[GLOB.round_id]" : ""] has started[allmins.len ? ".":" with no active admins online!"]")
|
send2adminchat("Server", "Round [GLOB.round_id ? "#[GLOB.round_id]" : ""] has started[allmins.len ? ".":" with no active admins online!"]")
|
||||||
if(!allmins.len)
|
|
||||||
send2adminirc("A round has started with no admins online.")
|
|
||||||
|
|
||||||
setup_done = TRUE
|
setup_done = TRUE
|
||||||
// TODO START
|
// TODO START
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ GLOBAL_LIST_EMPTY(additional_antag_types)
|
|||||||
if(escaped_on_cryopod > 0) //CHOMP Add
|
if(escaped_on_cryopod > 0) //CHOMP Add
|
||||||
feedback_set("escaped_on_cryopod",escaped_on_cryopod)
|
feedback_set("escaped_on_cryopod",escaped_on_cryopod)
|
||||||
|
|
||||||
send2mainirc("A round of [src.name] has ended - [surviving_total] survivors, [ghosts] ghosts.")
|
// send2mainirc("A round of [src.name] has ended - [surviving_total] survivors, [ghosts] ghosts.")
|
||||||
SSwebhooks.send(
|
SSwebhooks.send(
|
||||||
WEBHOOK_ROUNDEND,
|
WEBHOOK_ROUNDEND,
|
||||||
list(
|
list(
|
||||||
|
|||||||
@@ -145,7 +145,6 @@
|
|||||||
to_chat(src, span_admin_pm_notice("PM to-" + span_bold("Admins") + ": [rawmsg]"))
|
to_chat(src, span_admin_pm_notice("PM to-" + span_bold("Admins") + ": [rawmsg]"))
|
||||||
admin_ticket_log(src, span_admin_pm_warning("Reply PM from-" + span_bold("[key_name(src, TRUE, TRUE)]") + " to " + span_italics("IRC") + ": [keywordparsedmsg]"))
|
admin_ticket_log(src, span_admin_pm_warning("Reply PM from-" + span_bold("[key_name(src, TRUE, TRUE)]") + " to " + span_italics("IRC") + ": [keywordparsedmsg]"))
|
||||||
ircreplyamount--
|
ircreplyamount--
|
||||||
send2irc("Reply: [ckey]",rawmsg)
|
|
||||||
else
|
else
|
||||||
if(recipient.holder)
|
if(recipient.holder)
|
||||||
if(holder) //both are admins
|
if(holder) //both are admins
|
||||||
|
|||||||
@@ -112,16 +112,6 @@
|
|||||||
cmd_mentor_pm(C, null)
|
cmd_mentor_pm(C, null)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(href_list["irc_msg"])
|
|
||||||
if(!check_rights_for(src, R_HOLDER) && received_irc_pm < world.time - 6000) //Worse they can do is spam IRC for 10 minutes
|
|
||||||
to_chat(src, span_warning("You are no longer able to use this, it's been more than 10 minutes since an admin on IRC has responded to you"))
|
|
||||||
return
|
|
||||||
if(mute_irc)
|
|
||||||
to_chat(usr, span_warning("You cannot use this as your client has been muted from sending messages to the admins on IRC"))
|
|
||||||
return
|
|
||||||
send2adminirc(href_list["irc_msg"])
|
|
||||||
return
|
|
||||||
|
|
||||||
//VOREStation Add
|
//VOREStation Add
|
||||||
if(href_list["discord_reg"])
|
if(href_list["discord_reg"])
|
||||||
var/their_id = html_decode(href_list["discord_reg"])
|
var/their_id = html_decode(href_list["discord_reg"])
|
||||||
|
|||||||
@@ -6,15 +6,12 @@
|
|||||||
update_client_z(null)
|
update_client_z(null)
|
||||||
log_access_out(src)
|
log_access_out(src)
|
||||||
unset_machine()
|
unset_machine()
|
||||||
|
|
||||||
var/datum/admins/is_admin = GLOB.admin_datums[src.ckey]
|
var/datum/admins/is_admin = GLOB.admin_datums[src.ckey]
|
||||||
if(is_admin && is_admin.check_for_rights(R_HOLDER))
|
if(is_admin && is_admin.check_for_rights(R_HOLDER))
|
||||||
message_admins("Staff logout: [key_name(src)]") // Staff logout notice displays no matter what
|
message_admins("Staff logout: [key_name(src)]") // Staff logout notice displays no matter what
|
||||||
if (SSticker && SSticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing.
|
|
||||||
var/admins_number = GLOB.admins.len
|
|
||||||
|
|
||||||
if(admins_number == 0) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
|
|
||||||
send2adminirc("[key_name(src)] logged out - no more admins online.")
|
|
||||||
set_listening(NON_LISTENING_ATOM) //maybe remove this, even if it will cause a teensy bit more lag
|
set_listening(NON_LISTENING_ATOM) //maybe remove this, even if it will cause a teensy bit more lag
|
||||||
..()
|
..()
|
||||||
|
|
||||||
return 1
|
return TRUE
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ ADMIN_VERB(cmd_mentor_ticket_panel, (R_ADMIN|R_SERVER|R_MOD|R_MENTOR), "Mentor T
|
|||||||
|
|
||||||
//// VOREstation Additions Below
|
//// VOREstation Additions Below
|
||||||
|
|
||||||
/datum/ticket/proc/send2adminchat()
|
/datum/ticket/proc/send2adminchatwebhook()
|
||||||
if(!CONFIG_GET(string/chat_webhook_url))
|
if(!CONFIG_GET(string/chat_webhook_url))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick/ticket_list)
|
|||||||
log_admin("Ticket #[id]: [key_name(initiator)]: [name] - heard by [admin_number_present] non-AFK admins who have +BAN.")
|
log_admin("Ticket #[id]: [key_name(initiator)]: [name] - heard by [admin_number_present] non-AFK admins who have +BAN.")
|
||||||
if(admin_number_present <= 0)
|
if(admin_number_present <= 0)
|
||||||
to_chat(C, span_notice("No active admins are online, your adminhelp was sent to the admin discord."))
|
to_chat(C, span_notice("No active admins are online, your adminhelp was sent to the admin discord."))
|
||||||
send2adminchat()
|
send2adminchatwebhook()
|
||||||
|
|
||||||
var/list/adm = get_admin_counts()
|
var/list/adm = get_admin_counts()
|
||||||
var/list/activemins = adm["present"]
|
var/list/activemins = adm["present"]
|
||||||
@@ -790,7 +790,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick/ticket)
|
|||||||
final = "[msg] - No admins online"
|
final = "[msg] - No admins online"
|
||||||
else
|
else
|
||||||
final = "[msg] - All admins stealthed\[[english_list(stealthmins)]\], AFK\[[english_list(afkmins)]\], or lacks +BAN\[[english_list(powerlessmins)]\]! Total: [allmins.len] "
|
final = "[msg] - All admins stealthed\[[english_list(stealthmins)]\], AFK\[[english_list(afkmins)]\], or lacks +BAN\[[english_list(powerlessmins)]\]! Total: [allmins.len] "
|
||||||
send2irc(source,final)
|
// send2irc(source,final)
|
||||||
|
|
||||||
/proc/ircadminwho()
|
/proc/ircadminwho()
|
||||||
var/list/message = list("Admins: ")
|
var/list/message = list("Admins: ")
|
||||||
|
|||||||
@@ -262,6 +262,7 @@
|
|||||||
#include "code\_helpers\announcements.dm"
|
#include "code\_helpers\announcements.dm"
|
||||||
#include "code\_helpers\atmospherics.dm"
|
#include "code\_helpers\atmospherics.dm"
|
||||||
#include "code\_helpers\atom_movables.dm"
|
#include "code\_helpers\atom_movables.dm"
|
||||||
|
#include "code\_helpers\chat.dm"
|
||||||
#include "code\_helpers\datums.dm"
|
#include "code\_helpers\datums.dm"
|
||||||
#include "code\_helpers\distance_ch.dm"
|
#include "code\_helpers\distance_ch.dm"
|
||||||
#include "code\_helpers\events.dm"
|
#include "code\_helpers\events.dm"
|
||||||
@@ -2768,8 +2769,6 @@
|
|||||||
#include "code\modules\examine\descriptions\telecomms.dm"
|
#include "code\modules\examine\descriptions\telecomms.dm"
|
||||||
#include "code\modules\examine\descriptions\turfs.dm"
|
#include "code\modules\examine\descriptions\turfs.dm"
|
||||||
#include "code\modules\examine\descriptions\weapons.dm"
|
#include "code\modules\examine\descriptions\weapons.dm"
|
||||||
#include "code\modules\ext_scripts\irc.dm"
|
|
||||||
#include "code\modules\ext_scripts\python.dm"
|
|
||||||
#include "code\modules\fireworks\firework_launcher.dm"
|
#include "code\modules\fireworks\firework_launcher.dm"
|
||||||
#include "code\modules\fireworks\firework_stars.dm"
|
#include "code\modules\fireworks\firework_stars.dm"
|
||||||
#include "code\modules\fireworks\launcher_construction.dm"
|
#include "code\modules\fireworks\launcher_construction.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user