A python script is mentioned in the Freenode FAQ to allow connection to the Freenode IRC channels with first authenticating to the nickserv
daemon, when using xchat.
This script didn’t work for me, so I adapted it. Here is the modified version. Thanks to the xchat python plugin docs for helping me write the correct callback.
Oh, and btw, I added setting /msg nickserv set unfiltered on
once connected in order to be able to receive message from unauthenticated users…