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

Set last modified date+user on CS CLAIM #12

Merged
merged 1 commit into from
May 24, 2024

Conversation

stwalkerster
Copy link
Member

Currently CS CLAIM doesn't update the last modified by date and user when a CS CLAIM is done if an ACL entry for the user already exists. This change makes sure that those fields are overwritten where needed.

Resolves: #11

@jesopo jesopo self-assigned this Jan 26, 2023
@jesopo
Copy link
Member

jesopo commented Feb 2, 2024

could we instead use https://github.com/atheme/atheme/blob/a2d1df6/libathemecore/account.c#L1867 to modify the chanacs, whether new or old? there might be a reason we weren't using it already that i'm unaware of, but it's at least standard preexisting code that will correctly set these bits of metadata.

@ilbelkyr is there a reason we're not using that function already?

@skizzerz
Copy link
Contributor

I don't see any reason not to use chanacs_modify_simple here rather than effectively duplicating that logic.

Currently CS CLAIM doesn't update the last modified by date and user
when a CS CLAIM is done if an ACL entry for the user already exists.
This change makes sure that those fields are overwritten where needed.

Resolves: Libera-Chat#11
@stwalkerster
Copy link
Member Author

Updated to use chanacs_modify_simple instead

Testing
20:43 <@ProjectServ> thelounge14 (stwalkerster) PROJECT:REGISTER: proj
20:43 -ProjectServ- The project proj has been registered.
20:43 <@ProjectServ> thelounge14 (stwalkerster) PROJECT:CHANNEL:ADD: #proj to proj
20:43 -ProjectServ- The namespace #proj was registered to project proj.
20:43 <@ProjectServ> thelounge14 (stwalkerster) PROJECT:CONTACT:ADD: stwalkerster to proj (primary, private)
20:43 -ProjectServ- stwalkerster was set as a primary contact for project proj (only visible to staff).
20:43 <@ProjectServ> thelounge14 (stwalkerster) PROJECT:SET:OPENREG:ON: proj
20:43 -ProjectServ- The OPENREG flag has been set for the project proj.
20:44 -ChanServ- #proj is not registered.
20:44 <@ChanServ> thelounge14 (stwalkerster) CLAIM:REGISTER: #proj for proj
20:44 -ChanServ- #proj is now registered to stwalkerster, on behalf of the proj project.
20:44 -ProjectServ- The user thelounge14 (account name stwalkerster) has registered the channel #proj which is within the namespace (#proj) of a project that you are a group contact for (proj)
20:44 -ChanServ- The #proj namespace is managed by the proj project.
20:44 -ChanServ- Entry    Nickname/Host          Flags
20:44 -ChanServ- ----------------------------------------------------------------
20:44 -ChanServ- 1        stwalkerster           +AFRefiorstv         [modified 16s ago, on Feb 20 20:44:15 2024 +0000, by stwalkerster]
20:44 -ChanServ- ----------------------------------------------------------------
20:44 -ChanServ- End of #proj FLAGS listing.
20:45 <@ChanServ> thelounge14 (stwalkerster) FTRANSFER: #proj transferred from stwalkerster to fred
20:45 -ChanServ- Foundership of #proj has been transferred from stwalkerster to fred.
20:45 -ChanServ- Entry    Nickname/Host          Flags
20:45 -ChanServ- ----------------------------------------------------------------
20:45 -ChanServ- 1        stwalkerster           +ARefiorstv          [modified 23s ago, on Feb 20 20:44:45 2024 +0000, by stwalkerster]
20:45 -ChanServ- 2        fred                   +AFORefiorstv        (FOUNDER) [modified 23s ago, on Feb 20 20:44:45 2024 +0000, by stwalkerster]
20:45 -ChanServ- ----------------------------------------------------------------
20:45 -ChanServ- End of #proj FLAGS listing.
20:45 <@ChanServ> thelounge47 (fred) FLAGS: #proj stwalkerster -ARefiorstv
20:46 -ChanServ- Entry    Nickname/Host          Flags
20:46 -ChanServ- ----------------------------------------------------------------
20:46 -ChanServ- 1        fred                   +AFORefiorstv        (FOUNDER) [modified 1m 9s ago, on Feb 20 20:44:45 2024 +0000, by stwalkerster]
20:46 -ChanServ- ----------------------------------------------------------------
20:46 -ChanServ- End of #proj FLAGS listing.
20:46 <@ChanServ> thelounge14 (stwalkerster) CLAIM: #proj for proj
20:46 -ChanServ- Full access to #proj has been granted to stwalkerster on behalf of the proj project.
20:46 -ChanServ- Entry    Nickname/Host          Flags
20:46 -ChanServ- ----------------------------------------------------------------
20:46 -ChanServ- 1        fred                   +AFORefiorstv        (FOUNDER) [modified 1m 18s ago, on Feb 20 20:44:45 2024 +0000, by stwalkerster]
20:46 -ChanServ- 2        stwalkerster           +AFRefiorstv         [modified 3s ago, on Feb 20 20:46:00 2024 +0000, by stwalkerster]
20:46 -ChanServ- ----------------------------------------------------------------
20:46 -ChanServ- End of #proj FLAGS listing.
20:46 <@ChanServ> thelounge47 (fred) FLAGS: #proj stwalkerster -FRfrs
20:46 -ChanServ- Entry    Nickname/Host          Flags
20:46 -ChanServ- ----------------------------------------------------------------
20:46 -ChanServ- 1        fred                   +AFORefiorstv        (FOUNDER) [modified 1m 52s ago, on Feb 20 20:44:45 2024 +0000, by stwalkerster]
20:46 -ChanServ- 2        stwalkerster           +Aeiotv              [modified 22s ago, on Feb 20 20:46:15 2024 +0000, by fred]
20:46 -ChanServ- ----------------------------------------------------------------
20:46 -ChanServ- End of #proj FLAGS listing.
20:46 <@ChanServ> thelounge14 (stwalkerster) CLAIM: #proj for proj
20:46 -ChanServ- Full access to #proj has been granted to stwalkerster on behalf of the proj project.
20:46 -ChanServ- Entry    Nickname/Host          Flags
20:46 -ChanServ- ----------------------------------------------------------------
20:46 -ChanServ- 1        fred                   +AFORefiorstv        (FOUNDER) [modified 2m 1s ago, on Feb 20 20:44:45 2024 +0000, by stwalkerster]
20:46 -ChanServ- 2        stwalkerster           +AFRefiorstv         [modified 1s ago, on Feb 20 20:46:45 2024 +0000, by stwalkerster]
20:46 -ChanServ- ----------------------------------------------------------------
20:46 -ChanServ- End of #proj FLAGS listing.
20:47 -ChanServ- Flags -AFORefiorstv were set on fred in #proj.
20:47 <@ChanServ> thelounge14 (stwalkerster) FLAGS: #proj fred -AFORefiorstv
20:47 -ChanServ- Entry    Nickname/Host          Flags
20:47 -ChanServ- ----------------------------------------------------------------
20:47 -ChanServ- 1        stwalkerster           +AFRefiorstv         [modified 30s ago, on Feb 20 20:46:45 2024 +0000, by stwalkerster]
20:47 -ChanServ- ----------------------------------------------------------------
20:47 -ChanServ- End of #proj FLAGS listing.

@aaronmdjones aaronmdjones merged commit b9aa7b9 into Libera-Chat:main May 24, 2024
@stwalkerster stwalkerster deleted the csclaim-modified branch May 26, 2024 00:08
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.

CS CLAIM doesn't properly update last modified on CS FLAGS
4 participants