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 59626c3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
6 changes: 2 additions & 4 deletions code/datums/entities/player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,8 @@ 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
important_message_external("[banner.owning_client] has permanently banned [ckey] for '[reason]'.", "Permaban Placed", reason ? list(reason_embed) : null)
reason_embed = new("Permaban Reason", internal_reason)
important_message_external("[banner.owning_client] has permanently banned [ckey] for '[reason]'.", "Permaban Placed", reason_embed ? list(reason_embed) : null)

add_note("Permanently banned | [reason]", FALSE, NOTE_ADMIN, TRUE)
if(internal_reason)
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
6 changes: 2 additions & 4 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
important_message_external("[src] has added a new stickyban with the identifier '[identifier]'.", "Stickyban Placed", list(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_embed))

0 comments on commit 59626c3

Please sign in to comment.