Fixes ban / kick messages not showing (#11083)

This commit is contained in:
Karolis
2021-01-28 12:20:37 +02:00
committed by GitHub
parent 0c636cf27a
commit dd42356c4e
5 changed files with 16 additions and 12 deletions

View File

@@ -327,9 +327,9 @@
return
var/reason = sanitize(input("Please enter reason"))
if(!reason)
to_chat(M, "<span class='danger'>You have been kicked from the server</span>")
to_chat_immediate(M, "<span class='danger'>You have been kicked from the server</span>")
else
to_chat(M, "<span class='danger'>You have been kicked from the server: [reason]</span>")
to_chat_immediate(M, "<span class='danger'>You have been kicked from the server: [reason]</span>")
log_admin("[key_name(usr)] booted [key_name(M)].",admin_key=key_name(usr),ckey=key_name(M))
message_admins("<span class='notice'>[key_name_admin(usr)] booted [key_name_admin(M)].</span>", 1)
//M.client = null
@@ -367,15 +367,15 @@
notes_add(M.ckey,"[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.",usr)
else
notes_add_sql(M.ckey, "[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.", usr, M.lastKnownIP, M.computer_id)
to_chat(M, "<span class='danger'><BIG>You have been banned by [usr.client.ckey].\nReason: [reason].</BIG></span>")
to_chat(M, "<span class='danger'>This is a temporary ban, it will be removed in [mins] minutes.</span>")
to_chat_immediate(M, "<span class='danger'><BIG>You have been banned by [usr.client.ckey].\nReason: [reason].</BIG></span>")
to_chat_immediate(M, "<span class='danger'>This is a temporary ban, it will be removed in [mins] minutes.</span>")
feedback_inc("ban_tmp",1)
DB_ban_record(BANTYPE_TEMP, M, mins, reason)
feedback_inc("ban_tmp_mins",mins)
if(config.banappeals)
to_chat(M, "<span class='warning'>To try to resolve this matter head to [config.banappeals]</span>")
to_chat_immediate(M, "<span class='warning'>To try to resolve this matter head to [config.banappeals]</span>")
else
to_chat(M, "<span class='warning'>No ban appeals URL has been set.</span>")
to_chat_immediate(M, "<span class='warning'>No ban appeals URL has been set.</span>")
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.",admin_key=key_name(usr),ckey=key_name(M))
message_admins("<span class='notice'>[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.</span>")