Attempt to fix a bug in stats subparsing.
This commit is contained in:
1 parent
b69f4847a9
commit
c748d07662
2 files changed
+4294
-3
No files matched your search
Executable
+4284
File diff suppressed because it is too large.
Load diff
Regular → Executable
+10
-3
@@ -86,8 +86,12 @@ show_stats() {
|
||||
fi
|
||||
}
|
||||
|
||||
subCommand="$1"
|
||||
shift || true
|
||||
argumentString="$*"
|
||||
subCommand="${argumentString%% *}"
|
||||
subArgs=""
|
||||
if [[ "$argumentString" != "$subCommand" ]]; then
|
||||
subArgs="${argumentString#* }"
|
||||
fi
|
||||
|
||||
if [[ ! -f "$categoriesFile" ]]; then
|
||||
msg "$channelName" "The wordtrack trigger has not been configured."
|
||||
@@ -99,7 +103,10 @@ source "$categoriesFile"
|
||||
|
||||
case "$subCommand" in
|
||||
stats)
|
||||
targetRaw="${1:-$name}"
|
||||
targetRaw="${subArgs%% *}"
|
||||
if [[ -z "$targetRaw" ]]; then
|
||||
targetRaw="$name"
|
||||
fi
|
||||
targetUser="$(sanitize_nick "$targetRaw")"
|
||||
|
||||
if [[ -z "$targetUser" ]]; then
|
||||
|
||||
Reference in new issue
Block a user