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

Adds basic raid protection. #610

Merged
merged 7 commits into from
Jan 27, 2021
Merged

Adds basic raid protection. #610

merged 7 commits into from
Jan 27, 2021

Conversation

404dcd
Copy link
Member

@404dcd 404dcd commented Dec 29, 2020

This "starts the ball rolling" on issue #369 - a simple toggle command that toggles the ability of @.everyone to create instant invites, and on the ON toggle will delete all invites. It also sends a log to the logging channel. It is a root only command.

The code does work, but I'm making it a draft for now because I think we can add some extra functionality. Please voice your suggestions.

Initial commit including new command
@github-actions github-actions bot added the admin Changes to the admin cog label Dec 29, 2020
Copy link
Member

@Sh3llcod3 Sh3llcod3 left a comment

Choose a reason for hiding this comment

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

Good so far!

cdbot/cogs/admin.py Outdated Show resolved Hide resolved
cdbot/cogs/admin.py Outdated Show resolved Hide resolved
@ghost
Copy link

ghost commented Dec 29, 2020

What about the default invite thats mapped to that domain beano has

@404dcd
Copy link
Member Author

404dcd commented Dec 29, 2020

What about the default invite thats mapped to that domain beano has

So, that can either be reinstated manually or we could add some functionality that hits Cloudflare's API to update it.

Avoids checking bool twice unnecessarily
Copy link
Member

@thebeanogamer thebeanogamer left a comment

Choose a reason for hiding this comment

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

This looks like it'll work, I'll approve it properly once I've tested it

@404dcd 404dcd marked this pull request as ready for review January 2, 2021 12:35
@404dcd 404dcd requested a review from a team as a code owner January 2, 2021 12:35
Copy link
Member

@thebeanogamer thebeanogamer left a comment

Choose a reason for hiding this comment

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

Ok I've now tested this. I'm happy that it works, but there's a couple small tweaks I'd like before merging.

  1. Can we put the admin's name in the audit log please. I know it goes to #log, but having it in both would be nice
  2. I'm not a massive fan of having this as a toggle. I think it would work better as the base command showing you the current value, then you having to specify off/on. The current model has too high a chance for accidently toggling it to the wrong value because you don't know the current value.

@Sh3llcod3
Copy link
Member

Sh3llcod3 commented Jan 21, 2021

@404dcd
Copy link
Member Author

404dcd commented Jan 21, 2021

Ok, I'll get right on it.

404dcd added 3 commits January 21, 2021 22:28
… toggle, :raid will fetch status and :raid [on/off] sets. I also renamed it to just :raid
@github-actions github-actions bot added fun Changes to the fun cog module Changes to the bot module labels Jan 21, 2021
Copy link
Member

@Sh3llcod3 Sh3llcod3 left a comment

Choose a reason for hiding this comment

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

Do it

@thebeanogamer thebeanogamer enabled auto-merge (squash) January 27, 2021 20:42
@thebeanogamer thebeanogamer merged commit 931dc6b into CyberDiscovery:master Jan 27, 2021
@thebeanogamer thebeanogamer mentioned this pull request Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin Changes to the admin cog fun Changes to the fun cog module Changes to the bot module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants