Skip to content

Commit dd825ef

Browse files
authored
Merge pull request #116 from jkhsjdhjs/fix/capabilities_on_reconnect
Fix capabilities event listener
2 parents 1dd2a84 + 4c6f76f commit dd825ef

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

changelog.d/116.bugfix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix auto reconnect due to event listeners not being called.

src/irc.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,12 @@ export class Client extends (EventEmitter as unknown as new () => TypedEmitter<C
219219
if (opt.channelPrefixes) {
220220
this.state.supportedState.channel.types = opt.channelPrefixes;
221221
}
222-
this.state.capabilities.once('serverCapabilitesReady', () => {
222+
this.state.capabilities.on('serverCapabilitesReady', () => {
223223
this.onCapsList();
224224
// Flush on capabilities modified
225225
this.state.flush?.();
226226
})
227-
this.state.capabilities.once('userCapabilitesReady', () => {
227+
this.state.capabilities.on('userCapabilitesReady', () => {
228228
this.onCapsConfirmed();
229229
// Flush on capabilities modified
230230
this.state.flush?.();

0 commit comments

Comments
 (0)