Skip to content

Wait for NickServ response before joining channels when nickserv_ident is used #236

@osa1

Description

@osa1

We currently send NickServ identify message after RPL_WELCOME and join message after RPL_ENDOFMOTD. RPL_ENDOFMOTD is sent after RPL_WELCOME, but sometimes NickServ takes longer and authentication isn't successful until after RPL_ENDOFMOTD. When that happens we end up sending JOIN message before authenticating, which fails for channels with +R (login-to-join).

When nickserv_ident is used we should wait to hear from NickServ before sending JOIN.

Implementation is simple: just check for PRIVMSGs from NickServ in update in libtiny_client/src/state.rs and send join messages there. We'll need a bool field for whether we've sent JOIN already as we don't want to send JOIN every time we get a PRIVMSG from NickServ. The state should be false initially and reset on disconnect, and should be true after sending the JOIN message.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions