Adds a discord ping for mhelps if there aren't any mentors online (#15533)

* V1

* send2discord_simple_nomentors() proc

* Oh and this too

* Proc name

* Warning comment

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>

* Mentor logout notification message

Adding it in this PR since it's related

* Actually on second thought, this should definitely be its own PR instead

This reverts commit 1e93624c8b.

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
SabreML
2021-10-11 10:05:18 +01:00
committed by GitHub
parent 01ca06aa13
commit 3935be5808
4 changed files with 41 additions and 10 deletions
+1 -9
View File
@@ -47,16 +47,8 @@ GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown", "the", "a", "an", "of"
SSdiscord.send2discord_simple_noadmins("**\[Adminhelp]** [key_name(src)]: [msg]", check_send_always = TRUE)
if("Mentorhelp")
var/alerttext
var/list/mentorcount = staff_countup(R_MENTOR)
var/active_mentors = mentorcount[1]
var/inactive_mentors = mentorcount[3]
if(active_mentors <= 0)
if(inactive_mentors)
alerttext = " | **ALL MENTORS AFK**"
else
alerttext = " | **NO MENTORS ONLINE**"
log_admin("[selected_type]: [key_name(src)]: [msg] - heard by [active_mentors] non-AFK mentors.")
SSdiscord.send2discord_simple(DISCORD_WEBHOOK_MENTOR, "[key_name(src)]: [msg][alerttext]")
SSdiscord.send2discord_simple_mentor("[key_name(src)]: [msg]")