Add --ip filter to welcomebot-logs for signup-scrutiny decisions

This commit is contained in:
2026-07-02 16:51:24 -07:00
parent 0c51b186ac
commit 0a196c3788
+3
View File
@@ -24,6 +24,7 @@ Options:
--since WHEN Only logs newer than WHEN (e.g. 1h, 30m, 2026-06-17, 2026-06-17T20:00).
--abuse Only abuse-handler lines (reports, silences, dry-run, tiers).
--welcome Only welcome lines.
--ip Only IP-scrutiny lines (classifications, ip_block writes, RDAP errors).
-g, --grep PATTERN Only lines matching PATTERN (extended regex).
-h, --help Show this help.
@@ -32,6 +33,7 @@ Examples:
welcomebot-logs -f --abuse # follow live abuse activity only
welcomebot-logs -n 1000 --since 24h
welcomebot-logs -g 'acct=spammer'
welcomebot-logs --ip --since 24h # recent signup-IP classification decisions
EOF
}
@@ -42,6 +44,7 @@ while [ $# -gt 0 ]; do
--since) shift; since="${1:?--since needs a value}" ;;
--abuse) pattern='welcomebot (report |auto-|\[DRY-RUN\]|tier=|silenc|holds a staff|allowlisted)' ;;
--welcome) pattern='welcomebot (welcomed|already welcomed|skipping non-local|queued)' ;;
--ip) pattern='welcomebot (flagged signup|RDAP lookup failed|ip_block|unparseable ip)' ;;
-g|--grep) shift; pattern="${1:?--grep needs a value}" ;;
-h|--help) usage; exit 0 ;;
*) echo "welcomebot-logs: unknown option: $1" >&2; usage >&2; exit 2 ;;