Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix server capabilities handling #195

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

moshee
Copy link
Contributor

@moshee moshee commented Dec 13, 2013

Sometimes users want to enable stuff like ZNC server-time without using SASL. The old assumption that some servers just randomly reject connections when CAP REQ is sent before PASS seems to have been somewhat mistaken. According to the current spec, all we need is to send CAP END after CAP REQ to continue logging in.

So instead of testing for SASL being enabled before requesting any capabilities at all, I've moved the CAP REQs to the receiveCap handler so that the client only requests capabilities that are supported by the server. While this isn't strictly necessary (the server will just send CAP NAKs) it's probably a good thing™. This also puts all the cap handling in one place.

Tested (works) with ZNC 1.0, hybrid, charybdis, ircd-seven (Freenode).

@moshee
Copy link
Contributor Author

moshee commented Dec 13, 2013

Actually this has an issue. Might've broke SASL since I didn't read deep enough into how SASL negotiation works. I'll work on this some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant