mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
tguify SEND_ALERT (#29964)
This commit is contained in:
@@ -1128,28 +1128,27 @@ GLOBAL_LIST_INIT(view_logs_verbs, list(
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/alert_type = alert(src, "Do you wish to send an admin alert to [key_name(about_to_be_banned, FALSE)]?", null,"Yes", "No", "Custom Message")
|
||||
var/default_text = "An admin is trying to talk to you!\nCheck your chat window and click their name to respond or you may be banned!"
|
||||
var/new_text = tgui_input_text(src, "Input your message, or use the default.", "Admin Message - Text Selector", default_text, 500, TRUE)
|
||||
|
||||
switch(alert_type)
|
||||
if("Yes")
|
||||
var/message = "An admin is trying to talk to you!\nCheck your chat window and click their name to respond or you may be banned!"
|
||||
show_blurb(about_to_be_banned, 15, message, null, "center", "center", COLOR_RED, null, null, 1)
|
||||
log_admin("[key_name(src)] sent a default admin alert to [key_name(about_to_be_banned)].")
|
||||
message_admins("[key_name(src)] sent a default admin alert to [key_name(about_to_be_banned)].")
|
||||
if(!new_text)
|
||||
return
|
||||
|
||||
if("Custom Message")
|
||||
var/message = input(src, "Input your custom admin alert text:", "Message") as text|null
|
||||
if(!message)
|
||||
return
|
||||
message = strip_html(message, 500)
|
||||
if(default_text == new_text)
|
||||
show_blurb(about_to_be_banned, 15, new_text, null, "center", "center", COLOR_RED, null, null, 1)
|
||||
log_admin("[key_name(src)] sent a default admin alert to [key_name(about_to_be_banned)].")
|
||||
message_admins("[key_name(src)] sent a default admin alert to [key_name(about_to_be_banned)].")
|
||||
return
|
||||
|
||||
var/message_color = tgui_input_color(src, "Input your message color:", "Admin Message - Color Selector")
|
||||
if(isnull(message_color))
|
||||
return
|
||||
new_text = strip_html(new_text, 500)
|
||||
|
||||
show_blurb(about_to_be_banned, 15, message, null, "center", "center", message_color, null, null, 1)
|
||||
log_admin("[key_name(src)] sent an admin alert to [key_name(about_to_be_banned)] with custom message [message].")
|
||||
message_admins("[key_name(src)] sent an admin alert to [key_name(about_to_be_banned)] with custom message [message].")
|
||||
var/message_color = tgui_input_color(src, "Input your message color:", "Admin Message - Color Selector", COLOR_RED)
|
||||
if(isnull(message_color))
|
||||
return
|
||||
|
||||
show_blurb(about_to_be_banned, 15, new_text, null, "center", "center", message_color, null, null, 1)
|
||||
log_admin("[key_name(src)] sent an admin alert to [key_name(about_to_be_banned)] with custom message \"[new_text]\".")
|
||||
message_admins("[key_name(src)] sent an admin alert to [key_name(about_to_be_banned)] with custom message \"[new_text]\".")
|
||||
|
||||
/client/proc/debugstatpanel()
|
||||
set name = "Debug Stat Panel"
|
||||
|
||||
Reference in New Issue
Block a user