bancho.py
bancho.py copied to clipboard
Allow reason to be sent back to requestee for map requests
If a map is declined (or even accepted), it should enqueue mail to the requestee telling them that either their request was accepted (with the new status of the map), or the reason it was declined.
Currently the command for requests only displays the maps that have been requested.
@cmyui
For normal users, the !request
command doesn't currently check if the requested map is already in the map_requests
table.
This may lead to duplicate rows. We should add a check if the map_id
is already in the table. If it is, check if the map is active if not, mark it as active=1
and let the user know the request has been sent. If map is active=1
already just let them know that we have already received a request for that map.
To start off, the base !requests
command lacks functionality and there is no limit to the number of rows being displayed, which may lead to issues on larger servers like Akatsuki.
Some ideas:
!requests - displays the 10 most recent map requests.
!requests <limit> - displays the most recent map requests up to <limit> (LIMIT <limit>).
!requests <map id> accept <rank status> <reason> - Accepts the map request (set active=0) and ranks it
with the specified rank status and returns a reason if specified to the user.
!requests <map id> deny <reason> - Denies the map request (set active=0) and returns a reason if specified to the user.
All actions should be logged to the logs table.
It may also be possible to bake this into the !map command. But that seems a bit sloppy and I like this approach much more.
Let me know your thoughts, Yoru