Implement flag detection
Filnor opened this issue · 9 comments
Implement a background task that scans for flags (every ~30 minutes) and makes a closer watch if a user comes near to it (5 minute interval if closer than 20 10 flags).
The flag counts should regularly go through the flag rank check, so that users get notfied about if someone reaches a rank.
However, most bots should not be checked to increase performance, traffic and server load. All bots for specific rooms are listed below:
SOBotics
Bot name | Included in ranking |
---|---|
Natty | yes |
SmokeDetecor | yes |
Generic Bot | no |
Guttenberg | no |
Jammy | no |
FOX 9000 | no |
Queen | no |
Hatman | no |
Mystery | no |
Belisarius | no |
Badger | no |
FireAlarm | no |
Burnaki | no |
Thunder | no |
Housekeeping | no |
Have I missed a bot or do you want to suggest a change to whether or not to check a bot? Feels free to comment below!
Of course, you can also provide a list of Bots of a room where you would like CheckYerFlags to run.
You have 12 days left to implement this. wink wink
Regarding the bots: SmokeDetector has no flags, so no need to check. GenericBot only flags on exceptions, so it's probably not worth it to check.. Thus the only one left is Natty.
@Floern 12 days? Sorry, but that's not possible right now (pretty much pressure at work at the moment) 🤷♂️ . But thanks for the feedback on the bots, I'll update the table.
I'll implement this in a way that it logs the checking (in a seperate logfile), but not actually posts to the chat. This way I can check if the moving between queues actually works in production.
The feature is now implemented, and I'll close this issue as soon as we get the first report of a flag rank (Probably from Natty with 10k flags) which is correct, I will close this issue and release v1.0.
I spotted a couple improvements that could be made:
Exclude moderators
Moderators don't cast flags as long as they are a mod. So we can exclude them from automatic checking
Merge the auto-checking logs into a simpler format:
Merge the logging to one message for a user. Here is an example, for the low-priority queue:
2018-01-01 23:59:30 [INFO]: [LP] User needs more flags for their next flag rank.
and for the high-priority queue:
2018-01-01 23:59:30 [INFO]: [HP] User needs more flags for their next flag rank.
Log auto-checking to another file
The auto-checking really fills up the main log file very quickly (~6000 lines in 6 days), so this should get logged to another file.
Apparently, it works, so we're fine to move on to a 1.0.0 release
IIRC Smokey now casts one of the autoflags using its own account BTW, to make it clearer to moderators that the flags came from Charcoal. (This is a new feature, implemented just a couple weeks ago as part of the move to 4 autoflags.)
@NobodyNada That's correct, I got confirmation in CHQ. I will remove Smokey's user id from the list for the next update