Skip to content

Commit

Permalink
Задержка на использование here для созданных тикетов при отправки соо…
Browse files Browse the repository at this point in the history
…бщения в дискорд.
  • Loading branch information
ZVee committed Mar 30, 2019
1 parent 7181224 commit 3a53e8b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion code/modules/admin/verbs/adminhelp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ var/global/datum/admin_help_tickets/ahelp_tickets
var/obj/effect/statclick/ticket_list/cstatclick = new(null, null, AHELP_CLOSED)
var/obj/effect/statclick/ticket_list/rstatclick = new(null, null, AHELP_RESOLVED)

var/last_slap_mention_used = 0 // This acts as cooldown for sending @here to discord.

/datum/admin_help_tickets/Destroy()
QDEL_LIST(active_tickets)
QDEL_LIST(closed_tickets)
Expand Down Expand Up @@ -555,4 +557,8 @@ var/global/datum/admin_help_tickets/ahelp_tickets
else
final = "[msg] - All admins stealthed\[[english_list(stealthmins)]\], AFK\[[english_list(afkmins)]\], or lacks +BAN\[[english_list(powerlessmins)]\]! Total: [allmins.len] "

send2slack_admincall("@here adminhelp from *[source]*:", final)
if(world.time > ahelp_tickets.last_slap_mention_used)
ahelp_tickets.last_slap_mention_used = world.time + 30 MINUTES
send2slack_admincall("@here adminhelp from *[source]*:", final)
else
send2slack_admincall("adminhelp from *[source]*:", final)

0 comments on commit 3a53e8b

Please sign in to comment.