}
if($defined(nick))
- inick = nick;
-
+ inick = this.randSub(nick);
+
if(args["randomnick"] && args["randomnick"] == 1)
inick = this.options.initialNickname;
var details = ui_.loginBox(callback, inick, ichans, autoConnect, usingAutoNick);
}.bind(this));
+ },
+ randSub: function(nick) {
+ var getDigit = function() { return Math.floor(Math.random() * 10); }
+
+ return nick.split("").map(function(v) {
+ if(v == ".") {
+ return getDigit();
+ } else {
+ return v;
+ }
+ }).join("");
+
}
});
+/* NEEDS converting to plain HTML! */
qwebirc.ui.EmbedWizardStep = new Class({
Implements: [Options, Events],
options: {
this.nicknameBox.addClass("text");
this.nickname = this.newStep({
"title": "Set nickname",
- "first": "Enter the nickname you would like the client to use by default:",
+ "first": "Enter the nickname you would like the client to use by default (use a . for a random number):",
"premove": function() {
if(this.nicknameBox.value == "") {
alert("You must supply a nickname.");