Skip to content
This repository has been archived by the owner. It is now read-only.

chmode: use NULL for priv argument when auspex:cmodes priv is not needed #364

Merged
merged 1 commit into from Sep 10, 2020
Merged

chmode: use NULL for priv argument when auspex:cmodes priv is not needed #364

merged 1 commit into from Sep 10, 2020

Conversation

kaniini
Copy link
Contributor

@kaniini kaniini commented Sep 9, 2020

Commit d3fd88a introduced sendto_channel_local_priv() as a useful refactoring of the ONLY_OPERS hack in sendto_channel_local().

This works by introducing a new priv argument, which points to a string containing either the required privileges or NULL.

The same change, however, sends an empty string as the priv argument for unprivileged modes, causing modes to not be distributed. So we change that priv argument to NULL.

Otherwise, sendto_channel_local_priv() will only distribute mode changes to opers only. This is because HasPrivilege(target_p, "") will evaluate as false due to the target not being opered.

Thanks to Devin Brown for bisecting this issue.

Otherwise, sendto_channel_local_priv() will only distribute mode changes
to opers only.  This is because HasPrivilege(target_p, "") will evaluate
as false due to the target not being opered.

Thanks to Devin Brown for bisecting this issue.
@aaronmdjones aaronmdjones self-assigned this Sep 10, 2020
@aaronmdjones aaronmdjones merged commit e81795c into charybdis-ircd:master Sep 10, 2020
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants