diff --git a/code/datums/entities/player.dm b/code/datums/entities/player.dm index c4e5669fd808..5f9bc88d12e8 100644 --- a/code/datums/entities/player.dm +++ b/code/datums/entities/player.dm @@ -319,9 +319,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player) message_admins("[key_name_admin(banner.owning_client)] has permanently banned [ckey] for '[reason]'.") var/datum/tgs_chat_embed/field/reason_embed if(internal_reason) - reason_embed = new() - reason_embed.name = "Permaban Reason" - reason_embed.value = internal_reason + reason_embed = new("Permaban Reason", internal_reason) important_message_external("[banner.owning_client] has permanently banned [ckey] for '[reason]'.", "Permaban Placed", reason ? list(reason_embed) : null) add_note("Permanently banned | [reason]", FALSE, NOTE_ADMIN, TRUE) diff --git a/code/defines/procs/admin.dm b/code/defines/procs/admin.dm index 289d62e9314c..d48c02127ea9 100644 --- a/code/defines/procs/admin.dm +++ b/code/defines/procs/admin.dm @@ -7,7 +7,8 @@ embed.description = message embed.timestamp = time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss") embed.colour = "#ED2939" - embed.fields = fields + if(length(fields)) + embed.fields = fields to_send.embed = embed diff --git a/code/modules/admin/NewBan.dm b/code/modules/admin/NewBan.dm index b231fad0ceb0..847f75b1d358 100644 --- a/code/modules/admin/NewBan.dm +++ b/code/modules/admin/NewBan.dm @@ -323,7 +323,5 @@ GLOBAL_DATUM(Banlist, /savefile) log_admin("STICKYBAN: Identifier: [identifier] Reason: [reason] Message: [message] CKEYs: [english_list(impacted_ckeys)] IPs: [english_list(impacted_ips)] CIDs: [english_list(impacted_cids)]") message_admins("[key_name_admin(src)] has added a new stickyban with the identifier '[identifier]'.") - var/datum/tgs_chat_embed/field/reason_embed = new() - reason_embed.name = "Stickyban Reason" - reason_embed.value = reason + var/datum/tgs_chat_embed/field/reason_embed = new("Stickyban Reason", reason) important_message_external("[src] has added a new stickyban with the identifier '[identifier]'.", "Stickyban Placed", list(reason))