From 90ce92dc39395444862edfc7946ef7a1195f2464 Mon Sep 17 00:00:00 2001 From: dngfx Date: Fri, 31 Aug 2018 10:51:47 +0100 Subject: Revert "Reformat" This reverts commit abed9cf --- modules/hash.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'modules/hash.py') diff --git a/modules/hash.py b/modules/hash.py index 5cacda2f..86657bd1 100644 --- a/modules/hash.py +++ b/modules/hash.py @@ -1,20 +1,18 @@ import hashlib - class Module(object): def __init__(self, bot): self.bot = bot bot.events.on("received").on("command").on("hash" - ).hook(self.hash, min_args=2, - help="Hash a string", - usage=" ") + ).hook(self.hash, min_args=2, help="Hash a string", + usage=" ") def hash(self, event): algorithm = event["args_split"][0].lower() if algorithm in hashlib.algorithms_available: phrase = " ".join(event["args_split"][1:]) cipher_text = hashlib.new(algorithm, phrase.encode("utf8") - ).hexdigest() + ).hexdigest() event["stdout"].write("%s -> %s" % (phrase, cipher_text)) else: event["stderr"].write("Unknown algorithm provided") -- cgit v1.3.1-10-gc9f91