The login command should be like this: /msg x@channels.undernet.org login username password instead of $chan username password