Or you can use a protocol which actually just gives you this feature without needing to run another service to get it (which is basically all of IRC: it's a simplistic to the point of useless protocol which people have stacked a series of bodges on top of in order to actually make something approximating usable for highly technical users. It shocks me that anyone thinks this is good, let alone that it's better than the many alternatives now available).
That's just wrapping IRC in an actually usable protocol. At that point you aren't using IRC. Might as well use something like Matrix and be able to take advantage of a better protocol.