зеркало из https://github.com/mozilla/gecko-dev.git
Bug 299458 - parse RPL_ISUPPORTS parameter CMDS into usable datastructure.
ChatZilla only. r=samuel a=bsmedberg
This commit is contained in:
Родитель
f68ec11625
Коммит
3d26e727bf
|
@ -1330,10 +1330,13 @@ function serv_001 (e)
|
||||||
c: ['l'],
|
c: ['l'],
|
||||||
d: ['i', 'm', 'n', 'p', 's', 't']
|
d: ['i', 'm', 'n', 'p', 's', 't']
|
||||||
};
|
};
|
||||||
|
// Default to support of v/+ and o/@ only.
|
||||||
this.userModes = [
|
this.userModes = [
|
||||||
{ mode: 'o', symbol: '@' },
|
{ mode: 'o', symbol: '@' },
|
||||||
{ mode: 'v', symbol: '+' }
|
{ mode: 'v', symbol: '+' }
|
||||||
];
|
];
|
||||||
|
// Assume the server supports no extra interesting commands.
|
||||||
|
this.servCmds = {};
|
||||||
|
|
||||||
if (this.parent.INITIAL_UMODE)
|
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;
|
this.supports.rpl_isupport = true;
|
||||||
|
|
||||||
e.destObject = this.parent;
|
e.destObject = this.parent;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче