diff --git a/extensions/irc/xul/tests/test2-handlers.js b/extensions/irc/xul/tests/test2-handlers.js index 3ace1fe1e04..ce7532a7d7b 100644 --- a/extensions/irc/xul/tests/test2-handlers.js +++ b/extensions/irc/xul/tests/test2-handlers.js @@ -224,6 +224,39 @@ client.onInputMe = function cli_ime (e) } } +client.onInputNick = function cli_inick (e) +{ + + if (!e.inputData) + return false; + + if (e.server) + e.server.sendData ('NICK ' + e.inputData + '\\n'); + else + CIRCNetwork.prototype.INITIAL_NICK = e.inputData; + +} + +client.onInputName = function cli_iname (e) +{ + + if (!e.inputData) + return false; + + CIRCNetwork.prototype.INITIAL_NAME = e.inputData; + +} + +client.onInputDesc = function cli_idesc (e) +{ + + if (!e.inputData) + return false; + + CIRCNetwork.prototype.INITIAL_DESC = e.inputData; + +} + client.onInputAlias = function cli_ialias (e) { var ary = e.inputData.match (/(\S+)? ?(.*)/); diff --git a/extensions/irc/xul/tests/test2-static.js b/extensions/irc/xul/tests/test2-static.js index cc4a5cbda69..ce2a8477d0d 100644 --- a/extensions/irc/xul/tests/test2-static.js +++ b/extensions/irc/xul/tests/test2-static.js @@ -21,6 +21,12 @@ * Robert Ginda, rginda@ndcico.com, original author */ +CIRCNetwork.prototype.INITIAL_NICK = "IRCMonkey"; +CIRCNetwork.prototype.INITIAL_NAME = "chatzilla"; +CIRCNetwork.prototype.INITIAL_DESC = "New Now Know How"; +CIRCNetwork.prototype.INITIAL_CHANNEL = ""; +CIRCServer.prototype.READ_TIMEOUT = 0; + var client = new Object(); client.COMMAND_CHAR = "/"; @@ -34,9 +40,6 @@ client.INITIAL_ALIASES = {name: "connect", value: "e.network.connect();"}, {name: "quit", value: "client.quit(e.inputData ? e.inputData : 'no reason');"}, - {name: "nick", - value: "if (e.server && e.inputData) " + - "e.server.sendData ('NICK ' + e.inputData + '\\n');"}, {name: "network", value: "setCurrentNetwork(e.inputData); onListChannels();"}, {name: "channel", value: "setCurrentChannel(e.inputData); onListUsers();"}, ]; @@ -282,13 +285,6 @@ CIRCChannel.prototype.display = function chan_display (message, msgtype, nick) function initStatic() { - CIRCNetwork.prototype.INITIAL_NICK = "IRCMonkey"; - CIRCNetwork.prototype.INITIAL_NAME = "chatzilla"; - CIRCNetwork.prototype.INITIAL_DESC = "New Now Know How"; - /* it's a Charles Mingus tune, in case you're wondering */ - CIRCNetwork.prototype.INITIAL_CHANNEL = ""; - CIRCServer.prototype.READ_TIMEOUT = 0; - var list = document.getElementById("QuickList"); list.onclick = onListClick;