Use TLS
TLS (or SSL) encrypts your connection to the server (in this case IRC server), making your connection secure against man-in-the-middle attacks.
We have instructions on how to enable TLS/SSL on a few popular IRC clients:
xeroxIRC does not endorse the usage of any of these clients.