mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* storytellers * Update _base_event.dm * Update _base_event.dm * storytellers and midround events * work * antags * last * Update vote.dm * fixes * Update backrooms.dm * so long gay dynamic * Update vote.dm * dynamic unit test * cleanup * delete minimum pop * fix * storyteller tweaks * traitor awakening * Update traitor.dm * Update _basemap.dm * Update ghost.dm * oh god so much stuff * Update _logging.dm * buh bye events * Update nuclearbomb.dm * Update collections.ts * Revert "Update collections.ts" This reverts commitff93cf170a. * maybe * fix * fix * Update game_mode.dm * fixes * fixes and more logging * oh good gravy * Update portal_storm.dm * bring them back * Update gamemode_subsystem.dm * Update admin_verbs.dm * Update force_event.dm * damnit * Update _base_event.dm * fixes * more * it compiles :) * more * passes linter * Update radiation_leak.dm * Update dolphin_migration.dm * Update brother.dm * Update gamemode_subsystem.dm * Update _base_event.dm * Update _base_event.dm * updates * fixup * add vampire remove prompt * Update vampire.dm * Update vampire.dm * Update vampire.dm * Update _base_event.dm * Update gamemode_subsystem.dm * Update gamemode_subsystem.dm * Update dolphin_migration.dm * fix migration * title icon * fixes * formatting * Update gamemode_subsystem.dm * Update tzimisce.dm * Update tzimisce.dm * Update gamemode_subsystem.dm * Update storytellers.dm * tweak for our pop * Update darkspawn.dm * Update gamemode_subsystem.dm * tweaks and fixes * more and less roundstart * Update ghost.dm * lol lets just port the voting system * Update scrubber_overflow.dm * fix scrubber * bye gamemode * cleanup * Update clown_operative.dm * Update clown_operative.dm * Update _base_event.dm * probably fixed * Update supermatter_surge.dm * buh bye * Update brain_trauma.dm * more * new pseudogamemode vote * tweaks * Update gamemode_subsystem.dm * Update high_priority_bounty.dm * Update gamemode_subsystem.dm * Update storytellers.dm * Update high_priority_bounty.dm * tweaks * Update high_priority_bounty.dm * Update high_priority_bounty.dm * fixes * fixes * tweak * Update obsessed.dm * so long pal * Update battleroyale.dm * deletions * Update implant_dusting.dm * bye * uplinks fix * Update uplink_items.dm * Update uplink_items.dm * delete more gamemodes * more * lol one ctrl f change * hm what * Update antagonists.dm * Revert "Update antagonists.dm" This reverts commitc3c2ee192e. * Revert "hm what" This reverts commit43dbbcebcf. * Revert "lol one ctrl f change" This reverts commit95e28f5221. * cleanup * more stuff * more deletion * this one gone too * you and only you i shall save * Update revolution.dm * hold this please * it's done * bye admin stuff * Update uplink.dm * Update alert.dm * should be fine * fixes * tweaks * fixes * fixes * Update ticker.dm * this is important * Update heretic.dm * Update clown_operative.dm * rewrite * fixes * Update clockwork_cult.dm * fixes * Update uplink_items.dm * reorganize * Update objective.dm * rewrite nightmare * Update storytellers.dm * tweak * tweaks * Update stray_cargo.dm * Update stray_cargo.dm * Update stray_cargo.dm * delete unneeded tgui * Update ticker.dm * Update roundend.dm * Update anomaly_grav.dm * Update gamemode_subsystem.dm * Update statpanel.dm * Update statpanel.dm * no additional delay * clean up * Update _base_event.dm * Update _event.dm * antag token and brothers * no token picked * Update _base_event.dm --------- Co-authored-by: Byemoh <baiomurang@gmail.com>
134 lines
4.9 KiB
Plaintext
134 lines
4.9 KiB
Plaintext
#define IRC_STATUS_THROTTLE 5
|
|
|
|
/datum/tgs_chat_command/ircstatus
|
|
name = "status"
|
|
help_text = "Gets the admincount, playercount, and storyteller of the server"
|
|
admin_only = TRUE
|
|
var/last_irc_status = 0
|
|
|
|
/datum/tgs_chat_command/ircstatus/Run(datum/tgs_chat_user/sender, params)
|
|
var/rtod = REALTIMEOFDAY
|
|
if(rtod - last_irc_status < IRC_STATUS_THROTTLE)
|
|
return
|
|
last_irc_status = rtod
|
|
var/list/adm = get_admin_counts()
|
|
var/list/allmins = adm["total"]
|
|
var/status = "Admins: [allmins.len] (Active: [english_list(adm["present"])] AFK: [english_list(adm["afk"])] Stealth: [english_list(adm["stealth"])] Skipped: [english_list(adm["noflags"])]). "
|
|
status += "Players: [GLOB.clients.len] (Active: [get_active_player_count(0,1,0)]). Storyteller: [SSgamemode.storyteller ? SSgamemode.storyteller.name : "Not started"]."
|
|
return status
|
|
|
|
/datum/tgs_chat_command/irccheck
|
|
name = "check"
|
|
help_text = "Gets the playercount, gamemode, and address of the server"
|
|
var/last_irc_check = 0
|
|
|
|
/datum/tgs_chat_command/irccheck/Run(datum/tgs_chat_user/sender, params)
|
|
var/rtod = REALTIMEOFDAY
|
|
if(rtod - last_irc_check < IRC_STATUS_THROTTLE)
|
|
return
|
|
last_irc_check = rtod
|
|
var/server = CONFIG_GET(string/server)
|
|
return "[GLOB.round_id ? "Round #[GLOB.round_id]: " : ""][GLOB.clients.len] players on [SSmapping.config.map_name], Mode: [GLOB.master_mode]; Round [SSticker.HasRoundStarted() ? (SSticker.IsRoundInProgress() ? "Active" : "Finishing") : "Starting"] -- [server ? server : "[world.internet_address]:[world.port]"]"
|
|
|
|
/datum/tgs_chat_command/ahelp
|
|
name = "ahelp"
|
|
help_text = "<ckey|ticket #> <message|ticket <close|resolve|icissue|reject|reopen <ticket #>|list>>"
|
|
admin_only = TRUE
|
|
|
|
/datum/tgs_chat_command/ahelp/Run(datum/tgs_chat_user/sender, params)
|
|
var/list/all_params = splittext(params, " ")
|
|
if(all_params.len < 2)
|
|
return "Insufficient parameters"
|
|
var/target = all_params[1]
|
|
all_params.Cut(1, 2)
|
|
var/id = text2num(target)
|
|
if(id != null)
|
|
var/datum/admin_help/AH = GLOB.ahelp_tickets.TicketByID(id)
|
|
if(AH)
|
|
target = AH.initiator_ckey
|
|
else
|
|
return "Ticket #[id] not found!"
|
|
var/res = IrcPm(target, all_params.Join(" "), sender.friendly_name)
|
|
if(res != "Message Successful")
|
|
return res
|
|
|
|
/datum/tgs_chat_command/namecheck
|
|
name = "namecheck"
|
|
help_text = "Returns info on the specified target"
|
|
admin_only = TRUE
|
|
|
|
/datum/tgs_chat_command/namecheck/Run(datum/tgs_chat_user/sender, params)
|
|
params = trim(params)
|
|
if(!params)
|
|
return "Insufficient parameters"
|
|
log_admin("Chat Name Check: [sender.friendly_name] on [params]")
|
|
message_admins("Name checking [params] from [sender.friendly_name]")
|
|
return keywords_lookup(params, 1)
|
|
|
|
/datum/tgs_chat_command/adminwho
|
|
name = "adminwho"
|
|
help_text = "Lists administrators currently on the server"
|
|
admin_only = TRUE
|
|
|
|
/datum/tgs_chat_command/adminwho/Run(datum/tgs_chat_user/sender, params)
|
|
return ircadminwho()
|
|
|
|
GLOBAL_LIST(round_end_notifiees)
|
|
|
|
/datum/tgs_chat_command/notify
|
|
name = "notify"
|
|
help_text = "Pings the invoker when the round ends"
|
|
admin_only = TRUE
|
|
|
|
/datum/tgs_chat_command/notify/Run(datum/tgs_chat_user/sender, params)
|
|
if(!SSticker.IsRoundInProgress() && SSticker.HasRoundStarted())
|
|
return "[sender.mention], the round has already ended!"
|
|
LAZYINITLIST(GLOB.round_end_notifiees)
|
|
GLOB.round_end_notifiees[sender.mention] = TRUE
|
|
return "I will notify [sender.mention] when the round ends."
|
|
|
|
/datum/tgs_chat_command/sdql
|
|
name = "sdql"
|
|
help_text = "Runs an SDQL query"
|
|
admin_only = TRUE
|
|
|
|
/datum/tgs_chat_command/sdql/Run(datum/tgs_chat_user/sender, params)
|
|
if(GLOB.AdminProcCaller)
|
|
return "Unable to run query, another admin proc call is in progress. Try again later."
|
|
GLOB.AdminProcCaller = "CHAT_[sender.friendly_name]" //_ won't show up in ckeys so it'll never match with a real admin
|
|
var/list/results = world.SDQL2_query(params, GLOB.AdminProcCaller, GLOB.AdminProcCaller)
|
|
GLOB.AdminProcCaller = null
|
|
if(!results)
|
|
return "Query produced no output"
|
|
var/list/text_res = results.Copy(1, 3)
|
|
var/list/refs = results.len > 3 ? results.Copy(4) : null
|
|
. = "[text_res.Join("\n")][refs ? "\nRefs: [refs.Join(" ")]" : ""]"
|
|
|
|
/datum/tgs_chat_command/reload_admins
|
|
name = "reload_admins"
|
|
help_text = "Forces the server to reload admins."
|
|
admin_only = TRUE
|
|
|
|
/datum/tgs_chat_command/reload_admins/Run(datum/tgs_chat_user/sender, params)
|
|
ReloadAsync()
|
|
log_admin("[sender.friendly_name] reloaded admins via chat command.")
|
|
return "Admins reloaded."
|
|
|
|
/datum/tgs_chat_command/reload_admins/proc/ReloadAsync()
|
|
set waitfor = FALSE
|
|
GLOB.permissions.start()
|
|
|
|
/datum/tgs_chat_command/reload_mentors
|
|
name = "reload_mentors"
|
|
help_text = "Forces the server to reload mentors."
|
|
admin_only = TRUE
|
|
|
|
/datum/tgs_chat_command/reload_mentors/Run(datum/tgs_chat_user/sender, params)
|
|
ReloadAsync()
|
|
log_admin("[sender.friendly_name] reloaded mentors via chat command.")
|
|
return "Mentors reloaded."
|
|
|
|
/datum/tgs_chat_command/reload_mentors/proc/ReloadAsync()
|
|
set waitfor = FALSE
|
|
load_mentors()
|