diff --git a/bot.sh b/bot.sh index 48c0620..f68b761 100755 --- a/bot.sh +++ b/bot.sh @@ -149,7 +149,7 @@ tail -f "$input" | telnet "$server" "$port" | while read -r result ; do set -f # Although this calls modules, it triggers on text other than the bot's nick # To make sure that modules are only called when they are supposed to be, had to combine string monipulation with regexp. - elif [[ "${result#:*:}" =~ ^[${botCaller}][a-zA-Z_].* ]]; then + elif [[ "${result#:*:}" =~ ^[${botCaller}][a-zA-Z0-9_].* ]]; then command="${result#*:[[:punct:]]}" command="${command//# /}" will="${command#* }" diff --git a/modules/nick/nick.sh b/modules/nick/nick.sh index b23ffa9..0e3e919 100755 --- a/modules/nick/nick.sh +++ b/modules/nick/nick.sh @@ -6,4 +6,5 @@ shift if [[ "$user" =~ $allowList ]]; then ./modules/do/do.sh "$1" "#$channel" "does a magical gesture and turns into ${1}!" nick $1 + sed -i bot.cfg -e "s/nick=.*/nick=\"$1\"/" fi diff --git a/triggers/link/link.sh b/triggers/link/link.sh index 93bdc86..fe35d9f 100755 --- a/triggers/link/link.sh +++ b/triggers/link/link.sh @@ -3,7 +3,7 @@ for l in $3 ; do text="${l#:}" if [[ "${text}" =~ http://|https://|www\..* ]]; then -pageTitle="$(curl -L -s --connect-timeout 5 "$text" | sed -n -e 'H;${x;s!.*
]*>\(.*\).*!\1!;T;s!.*