+ var nickname = nick.value;
+ var chans = chan.value;
+ if(chans == "#") /* sorry channel "#" :P */
+ chans = "";
+
+ if(!nickname) {
+ alert("You must supply a nickname.");
+ nick.focus();
+ return;
+ }
+ var stripped = qwebirc.global.nicknameValidator.validate(nickname);
+ if(stripped != nickname) {
+ nick.value = stripped;
+ alert("Your nickname was invalid and has been corrected; please check your altered nickname and press Connect again.");
+ nick.focus();
+ return;
+ }
+