Attempt to fix a bug in stats subparsing.

This commit is contained in:
Storm Dragon
2026-01-11 19:53:49 -05:00
parent b69f4847a9
commit c748d07662
2 changed files with 4294 additions and 3 deletions
+4284
View File
File diff suppressed because it is too large Load Diff
Regular → Executable
+10 -3
View File
@@ -86,8 +86,12 @@ show_stats() {
fi fi
} }
subCommand="$1" argumentString="$*"
shift || true subCommand="${argumentString%% *}"
subArgs=""
if [[ "$argumentString" != "$subCommand" ]]; then
subArgs="${argumentString#* }"
fi
if [[ ! -f "$categoriesFile" ]]; then if [[ ! -f "$categoriesFile" ]]; then
msg "$channelName" "The wordtrack trigger has not been configured." msg "$channelName" "The wordtrack trigger has not been configured."
@@ -99,7 +103,10 @@ source "$categoriesFile"
case "$subCommand" in case "$subCommand" in
stats) stats)
targetRaw="${1:-$name}" targetRaw="${subArgs%% *}"
if [[ -z "$targetRaw" ]]; then
targetRaw="$name"
fi
targetUser="$(sanitize_nick "$targetRaw")" targetUser="$(sanitize_nick "$targetRaw")"
if [[ -z "$targetUser" ]]; then if [[ -z "$targetUser" ]]; then