diff --git a/handler/commands.py b/handler/commands.py index 9ccfcf8..e4a00b9 100644 --- a/handler/commands.py +++ b/handler/commands.py @@ -73,8 +73,8 @@ class IRCCommands(object): @staticmethod def run(cmd, spl, length, authed, msg, agora, revolut, tx): # Distribute out our ad to all countries in the config - rtrn = agora.dist_countries() - msg(dumps(rtrn)) + for x in agora.dist_countries(): + msg(dumps(x)) class find(object): name = "find" @@ -198,3 +198,17 @@ class IRCCommands(object): return tx.del_ref(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))