#### COMMAND MATCHING
nick="${player_name[$index]}" #find current chatter's nick
nick_length="${#nick}" #calculate nick's length
auto_msg=$nick" --> "$nick": " #string for auto /msg
auto_length="${#auto_msg}" #auto /msg length
nick_pos=`expr $nick_length + 4`
nick_line="${line:$nick_pos}"
nick_com=`expr match "$nick_line" '\(.* \)'`
if [ "${nick_line}" == ":help" ]
then
echo $bot_say"help: blablablab"
fi
if [ "${line:4:$auto_length}" == "$auto_msg" ] #if chatter does an auto /msg
then
com_pos=`expr $auto_length + 4` #calculate command's position
com_line="${line:$com_pos}" #match command line (with arguments)
com_com=`expr match "$com_line" '\(.* \)'` #match command (without arguments)