Debug added to say.
This commit is contained in:
@@ -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#\#}"
|
||||
|
||||
Reference in New Issue
Block a user