Skip to content

Commit 0a3d31b

Browse files
committed
Use correct default INVEX mode
1 parent 66127f5 commit 0a3d31b

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/client.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,13 +493,23 @@ module.exports = class IrcClient extends EventEmitter {
493493
}
494494

495495
addInvite(channel, mask) {
496-
var mode = this.network.supports('INVEX') || 'I';
496+
var mode = 'I';
497+
var invex = this.network.supports('INVEX');
498+
if (typeof invex === 'string') {
499+
mode = invex;
500+
}
501+
497502
var raw = ['MODE', channel, '+' + mode, mask];
498503
this.raw(raw);
499504
}
500505

501506
removeInvite(channel, mask) {
502-
var mode = this.network.supports('INVEX') || 'I';
507+
var mode = 'I';
508+
var invex = this.network.supports('INVEX');
509+
if (typeof invex === 'string') {
510+
mode = invex;
511+
}
512+
503513
var raw = ['MODE', channel, '-' + mode, mask];
504514
this.raw(raw);
505515
}

0 commit comments

Comments
 (0)