Use ISUPPORT CHANTYPES in Client.isChannel

This commit is contained in:
Simon Ser 2021-06-04 19:17:39 +02:00
parent db7aa337cb
commit 651e255ddb
2 changed files with 3 additions and 3 deletions

View file

@ -467,8 +467,8 @@ export default class Client extends EventTarget {
}
isChannel(name) {
// TODO: use the ISUPPORT token if available
return irc.STD_CHANNEL_TYPES.indexOf(name[0]) >= 0;
var chanTypes = this.isupport.get("CHANTYPES") || irc.STD_CHANTYPES;
return chanTypes.indexOf(name[0]) >= 0;
}
setPingInterval(sec) {

View file

@ -43,7 +43,7 @@ export const ERR_SASLABORTED = "906";
export const ERR_SASLALREADY = "907";
export const STD_MEMBERSHIPS = "~&@%+";
export const STD_CHANNEL_TYPES = "#&+!";
export const STD_CHANTYPES = "#&+!";
export const STD_CHANMODES = "beI,k,l,imnst";
const tagEscapeMap = {