Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ func (h *OomphHandler) HandleFlag(ctx *event.Context[*player.Player], dtc player
dtcKey := dtc.Type() + "_" + dtc.SubType()
msgTmpl := oconfig.DtcOpts(dtcKey).FlagMsg
viol := strconv.FormatFloat(m.Violations, 'f', 2, 64)
dataStr := utils.KeyValsToString(extraData)

// One-pass replace.
alertMsg := strings.NewReplacer(
Expand All @@ -217,6 +218,7 @@ func (h *OomphHandler) HandleFlag(ctx *event.Context[*player.Player], dtc player
"{detection_type}", dtc.Type(),
"{detection_subtype}", dtc.SubType(),
"{violations}", viol,
"{extraData}", dataStr,
).Replace(msgTmpl)
h.broadcastAlert(alertMsg)
}
Expand Down
1 change: 1 addition & 0 deletions oomph_config.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
# - {xuid}: The player's XBOX Live ID.
# - {violations}: The amount of violations that have been reached on the detection.
# - {prefix}: The prefix defined in the Oomph configuration.
# - {extraData}: The extra data provided for detections
detections:
{
Aim_A:
Expand Down