&delete_request allow deleting others req

This commit makes it possible for other admins to delete requests easily
master
jmjl 2023-11-04 10:52:58 +00:00
parent 305f1cd616
commit ffc91a26ce
1 changed files with 4 additions and 1 deletions

View File

@ -38,5 +38,8 @@ def tilde_requests_plugin(msg):
def delete_tilde_request_plugin(msg): def delete_tilde_request_plugin(msg):
if (msg.nick not in msg.ops and not util.tilde.DEBUG) and (not msg.nick in util.tilde.challenges): if (msg.nick not in msg.ops and not util.tilde.DEBUG) and (not msg.nick in util.tilde.challenges):
return return
if msg.arg:
del util.tilde.challenges[msg.arg]
else:
del util.tilde.challenges[msg.nick] del util.tilde.challenges[msg.nick]
return pinhook.plugin.message("Deleted") return pinhook.plugin.message("Deleted")