From f4fb34dde6b03fdb49f71476d587c5c7f986b565 Mon Sep 17 00:00:00 2001 From: Pawky Languish Date: Sat, 19 Apr 2025 19:07:38 +0000 Subject: idk some changes lol, formatting and stuff --- commands.py | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'commands.py') diff --git a/commands.py b/commands.py index 0740916..0493054 100644 --- a/commands.py +++ b/commands.py @@ -150,11 +150,7 @@ class Command: if not ctcp.endswith("\x01"): ctcp = ctcp + "\x01" if ctcp_upper.startswith("PING"): - ctcp = ( - "\x01PING" - + ("" if 1 == len(ctcp.split(" ")) else " ") - + " ".join(ctcp.split(" ")[1:]) - ) + ctcp = "\x01PING" + ("" if 1 == len(ctcp.split(" ")) else " ") + " ".join(ctcp.split(" ")[1:]) print(ctcp) self.notice(ctcp) if ctcp_upper.startswith("SOURCE"): @@ -190,11 +186,7 @@ class Command: args = args + ["", 3] elif len(args) < 3: args = args + ["3"] - for i in ( - popen(f"git log --pretty=oneline --abbrev-commit {args[1]}") - .read() - .split("\n", int(args[2])) - ): + for i in popen(f"git log --pretty=oneline --abbrev-commit {args[1]}").read().split("\n", int(args[2])): mesg(i) else: mesg(popen("git pull").read()) @@ -253,17 +245,12 @@ class Command: amount = 1 if not str(faces).isnumeric() or faces > 100: faces = 6 - mesg( - f"rolling {amount}d{faces}: " - + str([random.choice([i for i in range(faces)]) for n in range(amount)]) - ) + mesg(f"rolling {amount}d{faces}: " + str([random.choice([i for i in range(faces)]) for n in range(amount)])) @cmd def version(self, prefix, cmd, pm, line, admin, mesg): """version""" - mesg( - f"{self.config.self.nick} version {self.getversion()} ({self.config.self.source})" - ) + mesg(f"{self.config.self.nick} version {self.getversion()} ({self.config.self.source})") @adm def dbg2(self, prefix, cmd, pm, line, admin, mesg): -- cgit 1.4.1-2-gfad0