IRC protocol in JS