Revert "Add auto-colon functionality (will fix plugins when I next restart the bot)"

This reverts commit fc2db3cb6a.
This commit is contained in:
Robert Miles 2020-03-14 20:38:48 -04:00
parent c2669b1d33
commit 0f9a57199f
1 changed files with 2 additions and 9 deletions

11
bot.py
View File

@ -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