Attempt to fix a bug in stats subparsing.
This commit is contained in:
4284
modules/howl/howl.sh
Executable file
4284
modules/howl/howl.sh
Executable file
File diff suppressed because it is too large
Load Diff
13
modules/wordtrack/wordtrack.sh
Normal file → Executable file
13
modules/wordtrack/wordtrack.sh
Normal file → Executable file
@@ -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