Add release funds command

This commit is contained in:
Mark Veidemanis 2021-12-29 19:21:27 +00:00
parent 3bcebb9d61
commit 44d997ea20
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 16 additions and 2 deletions

View File

@ -73,8 +73,8 @@ class IRCCommands(object):
@staticmethod @staticmethod
def run(cmd, spl, length, authed, msg, agora, revolut, tx): def run(cmd, spl, length, authed, msg, agora, revolut, tx):
# Distribute out our ad to all countries in the config # Distribute out our ad to all countries in the config
rtrn = agora.dist_countries() for x in agora.dist_countries():
msg(dumps(rtrn)) msg(dumps(x))
class find(object): class find(object):
name = "find" name = "find"
@ -198,3 +198,17 @@ class IRCCommands(object):
return return
tx.del_ref(spl[1]) tx.del_ref(spl[1])
msg(f"Deleted reference: {spl[1]}") msg(f"Deleted reference: {spl[1]}")
class release(object):
name = "release"
authed = True
@staticmethod
def run(cmd, spl, length, authed, msg, agora, revolut, tx):
if length == 2:
tx = tx.ref_to_tx(spl[1])
if not tx:
msg(f"No such reference: {spl[1]}")
return
rtrn = agora.release_funds(tx)
msg(dumps(rtrn))