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

Add userhost-in-names capability #1374

Merged
merged 13 commits into from
Jan 20, 2024
Merged

Add userhost-in-names capability #1374

merged 13 commits into from
Jan 20, 2024

Conversation

vanosg
Copy link
Member

@vanosg vanosg commented Dec 24, 2022

Fixes: #1368
Fixes #1188

One-line summary:
Add IRCv3 userhost-in-names capability

Additional description (if needed):
This updates channel records with hostmasks received from the userhost-in-names capability, and nothing more. Useful for cases where WHO queries are disabled.\

@vanosg vanosg added this to the v1.10 milestone Dec 24, 2022
@vanosg
Copy link
Member Author

vanosg commented Dec 27, 2022

Current implementation questions:

  • Should enabling userhost-in-names not send a WHO?
  • Is it OK to have "competing" userhost requests? ie, a WHO and NAMES request toggling CHAN_PENDING flags; will this cause a desynch? (I don't think so)

@thommey
Copy link
Member

thommey commented Dec 30, 2022

It should still send WHO because we are also interested in account info.
Where does CHAN_PENDING get set on a names request? the names response is sent without a request after a JOIN and afaik eggdrop never requests names

@thommey
Copy link
Member

thommey commented Dec 30, 2022

Still need to add users, not just update hosts (and on updating hosts we might need to call chghost)

@vanosg
Copy link
Member Author

vanosg commented Dec 30, 2022

It should still send WHO because we are also interested in account info.

We don't get a WHO response at all (is my understanding)- so we won't get any account info.

Where does CHAN_PENDING get set on a names request?

Eggdrop gets a JOIN for itself (gotjoin), and sends reset_chan_info. reset_chan_info sets the channel into a CHAN_PENDING status until reset_chan_info calls refresh_who_chan, which sends a WHO #channel to the server. Once the 315 is received, CHAN_PENDING is removed and CHAN_ACTIVE is set.

More specifically to the question, it's not ever set right now as a response to NAMES, but after the gotjoin().

the names response is sent without a request after a JOIN and afaik eggdrop never requests names

From RFC, a 353 (names reply) is sent automatically after a JOIN. ( "If a JOIN is successful, the user is then sent the channel's topic (using RPL_TOPIC) and the list of users who are on the channel (using RPL_NAMREPLY), which must include the user joining") Without Eggdrop sending a NAMES, we're getting a 353 right now "for free".

@vanosg
Copy link
Member Author

vanosg commented Dec 31, 2022

Putting this here for probable later discussion:

  • got352or4 adds the WHO_SYNCED flag.
  • got315 calls sync_members()
  • sync_members clears users from the userlist that don't have the WHO_SYNCED flag set.

... because right now I'm debating running NAMES through got352or4 (hello got352or3or4!)

@vanosg
Copy link
Member Author

vanosg commented Jan 3, 2023

We're going to pause development on this feature until we can find a server that disables WHO. There are several implementation questions we have that can't be answered by our speculation, we need to see this "in the wild".

@vanosg vanosg removed this from the v1.10 milestone Jan 4, 2023
@ZarTek-Creole
Copy link
Contributor

I provided two IRC servers to @vanosg

@vanosg vanosg added this to the v1.10 milestone Apr 5, 2023
@vanosg vanosg force-pushed the feature/userhostnames branch from b2a7d2d to df4d2bf Compare January 1, 2024 15:56
@vanosg vanosg force-pushed the feature/userhostnames branch from c8c438b to 5a047d7 Compare January 2, 2024 00:14
src/mod/irc.mod/chan.c Outdated Show resolved Hide resolved
src/mod/irc.mod/chan.c Show resolved Hide resolved
src/mod/irc.mod/chan.c Show resolved Hide resolved
src/mod/irc.mod/chan.c Show resolved Hide resolved
@vanosg vanosg force-pushed the feature/userhostnames branch from 4d2cd7e to eed19ed Compare January 20, 2024 03:07
@vanosg vanosg merged commit 05377ac into develop Jan 20, 2024
2 checks passed
@vanosg vanosg deleted the feature/userhostnames branch February 5, 2024 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate/add userhost-in-names New features: userhost-in-names for IRCv3 capabilities
3 participants