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

feat: make !purge to clear user plays - e.g. they are blatant/other. #645

Open
GamebP opened this issue Mar 1, 2024 · 12 comments
Open

feat: make !purge to clear user plays - e.g. they are blatant/other. #645

GamebP opened this issue Mar 1, 2024 · 12 comments
Labels
enhancement New feature or request good first issue Good for newcomers Priority 2 A typical task - new functionality, organizational work on our software

Comments

@GamebP
Copy link

GamebP commented Mar 1, 2024

No description provided.

@GamebP GamebP added the triage This issue or pull request needs sorting. label Mar 1, 2024
@minisbett
Copy link
Contributor

I wanted to implement that, could do that on sunday.

If anyone else plans to, I'd suggest giving the ability to only wipe a certain timeframe and mode, but that might increase complexity since it requires a user stats recalc on that user though.

@GamebP
Copy link
Author

GamebP commented Mar 1, 2024

Certain timeframe as years/months/weeks/days/hours/minutes/seaconds... whatever how long - it be helpful.
Since it needs recalc, I don't know then.. You might be a experienced user on recalc.

Purge can also mean,
/purge [chat] <#channel (e.g. #osu)>
/purge <user (e.g. dumm123)> <mode (e.g. vn!)>
And some other things that other people have in mind.

@minisbett
Copy link
Contributor

Certain timeframe as years/months/weeks/days/hours/minutes/seaconds... whatever how long - it be helpful.

I was thinking more of specifying two dates inbetween which the wipe is done, with all-time as the default. And also I would not make this command responsible for purging chats as well.

I think this command should be called smth like !wipeuser, and for channels smth like !clear in the channel to be cleared

@GamebP
Copy link
Author

GamebP commented Mar 1, 2024

Yeah.
It can be called !wipeuser that associated with clearing users plays. I don't have anythin alse to say then.
But for chat, if it's gonna be implemented (but not needed).

@cmyui
Copy link
Member

cmyui commented Mar 1, 2024

I like the idea overall -- eventually I'd like to introduce a rework of the scores schema to allow for soft-deletion, so you don't need to effectively delete evidence by hard wiping the data. (easy to adjust later though -- this can be implemented as a hard-delete for now)

Scores & stats should get reset, and the player's session should get updated, and everyone else online notified. I'd probably suggest to keep replay data when this happens since the score ids are sequential/non-recurring?

@cmyui
Copy link
Member

cmyui commented Mar 1, 2024

but that might increase complexity since it requires a user stats recalc on that user though.

stats recalc will be required regardless if removing scores

@minisbett
Copy link
Contributor

stats recalc will be required regardless if removing scores

Not on a full wipe, you can just set all stats to 0 then.

@minisbett
Copy link
Contributor

eventually I'd like to introduce a rework of the scores schema to allow for soft-deletion, so you don't need to effectively delete evidence by hard wiping the data

Maybe make an issue for that? And leave ur thoughts on implementation there, maybe I'll implement it sometime

@GamebP
Copy link
Author

GamebP commented Mar 1, 2024

stats recalc will be required regardless if removing scores

Not on a full wipe, you can just set all stats to 0 then.

Yes

@cmyui
Copy link
Member

cmyui commented Mar 1, 2024

eventually I'd like to introduce a rework of the scores schema to allow for soft-deletion, so you don't need to effectively delete evidence by hard wiping the data

Maybe make an issue for that? And leave ur thoughts on implementation there, maybe I'll implement it sometime

Yeah I'm meditating on it since this - similar topic: #642 (comment)

I'll create tracking soon..

@cmyui cmyui added enhancement New feature or request good first issue Good for newcomers Priority 2 A typical task - new functionality, organizational work on our software and removed triage This issue or pull request needs sorting. labels Mar 1, 2024
@GamebP
Copy link
Author

GamebP commented May 19, 2024

How's the progress

@minisbett
Copy link
Contributor

How's the progress

no one's probably interesting in working on it, but if you want to do it manually, delete the scores via DELETE * FROM scores WHERE userid = :id AND mode = :mode, and update the stats via UPDATE stats SET pp = 0 WHERE id = :id AND mode = :mode.

Note that this does not update the global & country ranks, but they would be re-calculated when the !unrestrict command is performed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Priority 2 A typical task - new functionality, organizational work on our software
Projects
None yet
Development

No branches or pull requests

3 participants