The answer to your question is the chat server is being built now. Secure Mirc and web chat connections.
Having a connection script is a big hold back, and in this new chat system you won't need one.
The web chat will be able to securely Embed/Iframe on to any website.
It has Ircx protocol, so it can do #chatrooms and %#chatrooms and Unicode nicks. The list goes on.
I will release it here first on Coders-Resources