The chat_received TCL function is back

I have now reimplemented the chat_received TCL event handling function
so that it should be secure. Previously it had a serious flaw that could
allow anyone to run commands on the system. Now all characters special
to TCL are escaped. It's still a bit dangerous though. Make sure to
handle the input properly in the chat_received TCL function. Expect
anything...
A bracket was missing in the previous fix
Added a comment about the chat_received function being dangerous