Attempt to fix a bug in stats subparsing.
This commit is contained in:
Executable
+4284
File diff suppressed because it is too large
Load Diff
Regular → Executable
+10
-3
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user