From 3e1990388fbcd3b6f5d500bbd02d359a6b55655d Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Tue, 1 Feb 2022 20:50:08 +0000 Subject: [PATCH] Remove old command and add redist command --- handler/commands.py | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/handler/commands.py b/handler/commands.py index 1838680..f573c42 100644 --- a/handler/commands.py +++ b/handler/commands.py @@ -94,31 +94,18 @@ class IRCCommands(object): else: msg(dumps(x["response"])) - # class brute(object): - # name = "brute" - # authed = True - # helptext = "Use a bruteforce algorithm to create all possible currency and country pairs." - # - # @staticmethod - # def run(cmd, spl, length, authed, msg, agora, revolut, tx, notify): - # for x in agora.dist_bruteforce(): - # if x["success"]: - # msg(f"{x['response']['data']['message']}: {x['response']['data']['ad_id']}") - # else: - # msg(dumps(x)) - # - # class fillblanks(object): - # name = "fillblanks" - # authed = True - # helptext = "Resume a run of brute by getting all our adverts then filling the blanks." - # - # @staticmethod - # def run(cmd, spl, length, authed, msg, agora, revolut, tx, notify): - # for x in agora.bruteforce_fill_blanks(): - # if x["success"]: - # msg(f"{x['response']['data']['message']}: {x['response']['data']['ad_id']}") - # else: - # msg(dumps(x)) + class redist(object): + name = "redist" + authed = True + helptext = "Update all ads with details." + + @staticmethod + def run(cmd, spl, length, authed, msg, agora, revolut, tx, notify): + for x in agora.redist_countries(): + if x["success"]: + msg(f"{x[0]['response']['data']['message']}: {x[1]}") + else: + msg(dumps(x["response"])) class stripdupes(object): name = "stripdupes"