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

send pseudo MODE for chm_hidden modes on oper_up #98

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jesopo
Copy link
Member

@jesopo jesopo commented Jan 1, 2021

placement of this code might be wrong. it's quadratic which I think is probably fine unless we have loads of chm_hidden modes or so. usual caveat that I'm not great at C

closes #97

Copy link
Contributor

@edk0 edk0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good change. I've got some nitpicks (and one important thing) in the review comments. I also wonder if it's worth sending RPL_CHANNELMODEIS rather than MODE if it'll do the same job of keeping clients in sync?

ircd/s_user.c Outdated Show resolved Hide resolved
ircd/s_user.c Outdated Show resolved Hide resolved
ircd/s_user.c Outdated Show resolved Hide resolved
ircd/s_user.c Outdated Show resolved Hide resolved
@@ -1469,6 +1474,29 @@ oper_up(struct Client *source_p, struct oper_conf *oper_p)
send_umode_out(source_p, source_p, old);
sendto_one_numeric(source_p, RPL_SNOMASK, form_str(RPL_SNOMASK),
construct_snobuf(source_p->snomask));

if (HasPrivilege(source_p, "auspex:cmodes"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't oper_up when your privset changes, so I think this is the wrong place to do anything that checks privs. Currently the best place is probably user_mode, hacky though it is, since we arrange to call it every time privs change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't it also get called for other stuff? how are we meant to know when /mode mynick isn't supposed to send out these MODEs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can :(

Maybe it's time to bite the bullet and add a standard mechanism for all privilege changes

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this involve

@jesopo
Copy link
Member Author

jesopo commented Jan 25, 2021

do we also want to send the removal of these modes if someone either deopers are drops to a privset without auspex:cmodes?

@edk0
Copy link
Contributor

edk0 commented Jan 25, 2021

I think that'd be ideal, yeah.

@jesopo jesopo marked this pull request as draft January 25, 2021 11:44
@jesopo
Copy link
Member Author

jesopo commented Jan 25, 2021

then when we add a "standard mechanism" for priv changes, we'd want to make sure it's also called for changing to no privs

@jesopo
Copy link
Member Author

jesopo commented Feb 13, 2021

depends on #112

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.

chm_hidden modes are not seen if you oper up after joining
2 participants