It's a series of function calls, but ultimately, it's handled by
ChatEdit_InsertLink().
Here's what the call stack should look like:
(Note: All except the last reference the line number for the next call.
The last is the function definition itself.)