Skip to content

Commit

Permalink
does this properly
Browse files Browse the repository at this point in the history
  • Loading branch information
harryob committed Feb 12, 2024
1 parent 9794fee commit 5416c4f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 1 addition & 3 deletions code/datums/entities/player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion code/defines/procs/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 1 addition & 3 deletions code/modules/admin/NewBan.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))

0 comments on commit 5416c4f

Please sign in to comment.