From 68b6ba51d3f0e621414481f9f1d81811a77ceda7 Mon Sep 17 00:00:00 2001 From: AK Date: Sun, 2 Aug 2026 22:20:15 -0700 Subject: [PATCH] feat: add playful attack plugin --- config.yaml | 1 + docs/configuration.md | 1 + docs/plugins.md | 24 +++++ plugins/attack.go | 239 +++++++++++++++++++++++++++++++++++++++++ plugins/attack_test.go | 78 ++++++++++++++ plugins/plugins.go | 1 + 6 files changed, 344 insertions(+) create mode 100644 plugins/attack.go create mode 100644 plugins/attack_test.go diff --git a/config.yaml b/config.yaml index d1c4188..06f9491 100644 --- a/config.yaml +++ b/config.yaml @@ -114,6 +114,7 @@ plugins: calc: {enabled: true} # Local, operator-editable text catalogs; one line per entry under data/fun. fun: {enabled: true, data_dir: "data/fun", max_length: 240} + attack: {enabled: true} # High-level local firearm/weapons catalog; identification only, no instructions. weapons: {enabled: true, data_file: "data/weapons.txt", max_length: 240} # Public GitHub lookups; token is optional and should be supplied out-of-band. diff --git a/docs/configuration.md b/docs/configuration.md index 59a5cc1..28464f8 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -94,6 +94,7 @@ plugins: define: {enabled: true, timeout_seconds: 8, max_length: 240} calc: {enabled: true} fun: {enabled: true, data_dir: "data/fun", max_length: 240} + attack: {enabled: true} weapons: {enabled: true, data_file: "data/weapons.txt", max_length: 240} github: {enabled: true, timeout_seconds: 8, max_length: 360, token: ""} reddit: {enabled: true, timeout_seconds: 8, max_length: 360} diff --git a/docs/plugins.md b/docs/plugins.md index 15c7ff7..ea494bc 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -32,6 +32,7 @@ Plugins are enabled or disabled under plugins..enabled in config.yaml. - cats: short cat facts - eightball: customizable Magic 8-Ball answers - fun: local yo-momma jokes, one-liners, puns, and wisdom +- attack: playful target-based actions and messages - cheer: family-friendly cheers - seen, tell, karma, and dice: channel utilities - quote, choose, and time: lightweight utilities @@ -602,6 +603,29 @@ plugins: The catalogs are local and editable, so operators can remove a line or adapt the tone of a channel without changing Go code. +## Attack actions + +The `attack` plugin provides short, playful target-based actions and messages: + +~~~text +!attack slap Alice +!slap Alice +!hug Alice +!flirt Alice +!compliment Alice +!high5 Alice +!gift Alice +~~~ + +The canonical form is `!attack