X-SASL provides SASL support for XChat. It is based on the cap_sasl plugin. You can set your username and password for a given network with:
Where the password is in plain text format and networkname is the name specified in the Network List. It should apply the next time you connect to the specified network.
The settings are saved to disk so you need to set it only once for each network. There are more options available, see
for more info.
The source code is available in the repo.