From d801547bb2d4a0fc4dfb12501c15ba3807dca965 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 20 Nov 2025 12:42:16 -0500 Subject: [PATCH] Debug added to say. --- modules/say/say.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/say/say.sh b/modules/say/say.sh index 11b8900..9673824 100755 --- a/modules/say/say.sh +++ b/modules/say/say.sh @@ -7,6 +7,9 @@ userName="$1" channelName="$2" shift 2 +# Debug logging +echo "DEBUG say.sh: userName='$userName' channelName='$channelName' args='$*'" >> "$log" + # Check if there are any arguments if [[ -z "$*" ]]; then msg "$channelName" "$userName: Please provide a message to say." @@ -23,8 +26,10 @@ fi if [[ "$channelName" == "$userName" ]]; then # PM context: check if first argument is a channel name firstArg="$1" + echo "DEBUG say.sh: PM context detected, firstArg='$firstArg'" >> "$log" # Check if first argument starts with # (explicit channel) + # IRC channels can contain: alphanumeric, -, _, and some special chars if [[ "$firstArg" =~ ^#[a-zA-Z0-9_-]+$ ]]; then # Remove # prefix for comparison with configured channels targetChannel="${firstArg#\#}"