Parse ISUPPORT tokens in client
This commit is contained in:
parent
e242d5222e
commit
305ffb569c
2 changed files with 7 additions and 4 deletions
|
@ -28,6 +28,7 @@ export default class Client extends EventTarget {
|
|||
nick = null;
|
||||
availableCaps = {};
|
||||
enabledCaps = {};
|
||||
isupport = new Map();
|
||||
|
||||
ws = null;
|
||||
params = {
|
||||
|
@ -82,6 +83,7 @@ export default class Client extends EventTarget {
|
|||
this.enabledCaps = {};
|
||||
this.batches = new Map();
|
||||
this.pendingHistory = Promise.resolve(null);
|
||||
this.isupport = new Map();
|
||||
|
||||
if (this.autoReconnect) {
|
||||
console.info("Reconnecting to server in " + RECONNECT_DELAY_SEC + " seconds");
|
||||
|
@ -158,6 +160,10 @@ export default class Client extends EventTarget {
|
|||
this.setStatus(Client.Status.REGISTERED);
|
||||
this.serverPrefix = msg.prefix;
|
||||
break;
|
||||
case irc.RPL_ISUPPORT:
|
||||
var tokens = msg.params.slice(1, -1);
|
||||
irc.parseISUPPORT(tokens, this.isupport);
|
||||
break;
|
||||
case "CAP":
|
||||
this.handleCap(msg);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue