Skip to content

Commit 388adda

Browse files
committed
Support non-standard invex modes
1 parent 423dee2 commit 388adda

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/client.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,8 @@ module.exports = class IrcClient extends EventEmitter {
436436

437437
inviteList(channel, cb) {
438438
var client = this;
439-
var raw = ['MODE', channel, 'I'];
439+
var raw = ['MODE', channel, this.network.supports('INVEX') || 'I'];
440+
440441

441442
this.on('inviteList', function onInviteList(event) {
442443
if (event.channel.toLowerCase() === channel.toLowerCase()) {
@@ -456,12 +457,14 @@ module.exports = class IrcClient extends EventEmitter {
456457
}
457458

458459
addInvite(channel, mask) {
459-
var raw = ['MODE', channel, '+I', mask];
460+
var mode = this.network.supports('INVEX') || 'I';
461+
var raw = ['MODE', channel, '+' + mode, mask];
460462
this.raw(raw);
461463
}
462464

463465
removeInvite(channel, mask) {
464-
var raw = ['MODE', channel, '-I', mask];
466+
var mode = this.network.supports('INVEX') || 'I';
467+
var raw = ['MODE', channel, '-' + mode, mask];
465468
this.raw(raw);
466469
}
467470

0 commit comments

Comments
 (0)