Bug 299458 - parse RPL_ISUPPORTS parameter CMDS into usable datastructure.

ChatZilla only.
r=samuel
a=bsmedberg
This commit is contained in:
silver%warwickcompsoc.co.uk 2005-07-10 15:50:30 +00:00
Родитель f68ec11625
Коммит 3d26e727bf
1 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -335,7 +335,7 @@ function net_doconnect(e)
catch(ex)
{
this.state = NET_OFFLINE;
ev = new CEvent ("network", "error", this, "onError");
ev.server = this;
ev.debug = "Exception opening socket: " + ex;
@ -1330,10 +1330,13 @@ function serv_001 (e)
c: ['l'],
d: ['i', 'm', 'n', 'p', 's', 't']
};
// Default to support of v/+ and o/@ only.
this.userModes = [
{ mode: 'o', symbol: '@' },
{ mode: 'v', symbol: '+' }
];
// Assume the server supports no extra interesting commands.
this.servCmds = {};
if (this.parent.INITIAL_UMODE)
{
@ -1461,6 +1464,14 @@ function serv_005 (e)
}
}
if ("cmds" in this.supports)
{
// Map this.supports.cmds [comma-list] into this.servCmds [props].
var cmdlist = this.supports.cmds.split(/,/);
for (var i = 0; i < cmdlist.length; i++)
this.servCmds[cmdlist[i].toLowerCase()] = true;
}
this.supports.rpl_isupport = true;
e.destObject = this.parent;