mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 07:03:30 +01:00
Discord messages
This commit is contained in:
@@ -97,9 +97,9 @@
|
||||
qdel(exist_query)
|
||||
else
|
||||
if(!exist_query.NextRow()) // If there isnt a row, they aint been seen before
|
||||
if(SSqueue && SSqueue.queue_enabled && (length(GLOB.clients) > SSqueue.queue_threshold) && !(ckey in SSqueue.queue_bypass_list)) // To the person who tells me in code review "Oh you should use ?. here". No. That logic isnt appropriate here. It needs a dedicated null check due to the length comparison.
|
||||
if(SSqueue?.queue_enabled && (length(GLOB.clients) > SSqueue.queue_threshold) && !(ckey in SSqueue.queue_bypass_list))
|
||||
qdel(exist_query)
|
||||
return list("reason" = "server queue", "desc" = "You seem to have managed to skip the server queue, possibly due to connecting during a restart. Please reconnect in 10 minutes. If you still cant connect, please inform the server host.")
|
||||
return list("reason" = "server queue", "desc" = "You seem to have managed to skip the server queue, possibly due to connecting during a restart. Please reconnect in 10 minutes. If you still cannot connect, please inform the server host.")
|
||||
|
||||
qdel(exist_query)
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
to_chat(usr, "Queue server is now <b>[SSqueue.queue_enabled ? "<font color='green'>Enabled</font>" : "<font color='red'>Disabled</font>"]</b>")
|
||||
message_admins("[key_name_admin(usr)] has [SSqueue.queue_enabled ? "enabled" : "disabled"] the server queue.")
|
||||
log_admin("[key_name(usr)] has [SSqueue.queue_enabled ? "enabled" : "disabled"] the server queue.")
|
||||
SSdiscord.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "**\[Queue Server]** `[usr.ckey]` has now **[SSqueue.queue_enabled ? "enabled" : "disabled"]** the queue server.")
|
||||
if("Set Threshold")
|
||||
var/new_threshold = input(usr, "Enter new threshold", "Queue Server Manipulation", SSqueue.queue_threshold) as num|null
|
||||
if(!new_threshold)
|
||||
@@ -28,11 +29,13 @@
|
||||
to_chat(usr, "Queue threshold is now <b>[SSqueue.queue_threshold]</b>")
|
||||
message_admins("[key_name_admin(usr)] has set the queue threshold to [SSqueue.queue_threshold].")
|
||||
log_admin("[key_name(usr)] has set the queue threshold to [SSqueue.queue_threshold].")
|
||||
SSdiscord.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "**\[Queue Server]** `[usr.ckey]` has set the queue threshold to **[SSqueue.queue_threshold]**.")
|
||||
if("Toggle Setting Persistence")
|
||||
SSqueue.persist_queue = !SSqueue.persist_queue
|
||||
to_chat(usr, "Queue server setting persistence is now <b>[SSqueue.persist_queue ? "<font color='green'>Enabled</font>" : "<font color='red'>Disabled</font>"]</b>")
|
||||
message_admins("[key_name_admin(usr)] has [SSqueue.persist_queue ? "enabled" : "disabled"] the server queue settings persistence.")
|
||||
log_admin("[key_name(usr)] has [SSqueue.persist_queue ? "enabled" : "disabled"] the server queue settings persistence.")
|
||||
SSdiscord.send2discord_simple(DISCORD_WEBHOOK_ADMIN, "**\[Queue Server]** `[usr.ckey]` has now **[SSqueue.persist_queue ? "enabled" : "disabled"]** server queue settings persistence.")
|
||||
|
||||
/client/proc/add_queue_server_bypass()
|
||||
set name = "Add Queue Server Bypass"
|
||||
|
||||
Reference in New Issue
Block a user