Fix incorrect output on disconnect for cli mode

The '.' command would fail to exit the function, causing the 'help' output to occur.
Fix this by having the '.' command processed in the same manner as the rest.