Use the PircBotX.identify method instead of messaging nickserv directly.