diff options
-rwxr-xr-x | shbot.sh | 2 | ||||
-rwxr-xr-x | shbrain.sh | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -11,7 +11,7 @@ do if [[ "$LINE" =~ PING\ *:(.*) ]]; then echo "PONG :${BASH_REMATCH[1]}" >&3 else - [[ ${LINE} =~ :[a-zA-Z]*!.*(#.*)\ :.* ]] && ORIGIN=${BASH_REMATCH[1]} + [[ ${LINE} =~ :[^!]*![^#]*(#.*)\ :.* ]] && ORIGIN=${BASH_REMATCH[1]} echo "${LINE}" | ./shbrain.sh | \ while true do @@ -8,7 +8,7 @@ do LINE=${LINE[@]:0:$LEN} ### Parsing potential shcmd - if [[ $LINE =~ :([a-zA-Z]*)!.*:shcmd ]]; then + if [[ $LINE =~ :([^!]*)!.*:shcmd ]]; then EXPAND=(${LINE}) CMD=${EXPAND[4]#:} ARGS=${EXPAND[*]:5} |