From 0f9a57199fabc5ac2de7881bdccc31c4edec321d Mon Sep 17 00:00:00 2001 From: khuxkm fbexl Date: Sat, 14 Mar 2020 20:38:48 -0400 Subject: [PATCH] Revert "Add auto-colon functionality (will fix plugins when I next restart the bot)" This reverts commit fc2db3cb6ab32eab6ea0fd15fcc975e185e2699a. --- bot.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/bot.py b/bot.py index 28d6b76..f66aaac 100644 --- a/bot.py +++ b/bot.py @@ -59,14 +59,7 @@ class IRCLine: prefix+=" " if self.hostmask: prefix+=":{} ".format(self.hostmask) - # handle automatically adding a colon if the last parameter has spaces in it - parts = [self.command] - if self.params: - last_param = self.params[-1] - parts.extend(self.params[:-1]) - if " " in last_param: last_param = ":"+last_param - parts.append(last_param) - return prefix+" ".join(parts)+"\r\n" + return prefix+" ".join([self.command]+self.params)+"\r\n" @classmethod def parse_line(cls,line): parts = line.split() @@ -84,7 +77,7 @@ class IRCLine: hostmask=parts.pop(0)[1:] i=len(parts)-1 while i>0 and not parts[i].startswith(":"): i-=1 - if i!=0: parts[i:]=[" ".join(parts[i:])[1:]] + if i!=0: parts[i:]=[" ".join(parts[i:])] return cls(*parts,tags=tags,hostmask=hostmask) def encode(self,*args,**kwargs): # clearly, if we're here, I'm an idiot and am trying to send an