зеркало из https://github.com/mozilla/pjs.git
Modified test client to allow /nick changes *before* connecting to a network.
Very useful if more than person tried to use the client. Also added /name and /desc to change /whois information (only works before connecting.)
This commit is contained in:
Родитель
383b121941
Коммит
e49d322f88
|
@ -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+)? ?(.*)/);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче