Revert "Add auto-colon functionality (will fix plugins when I next restart the bot)"
This reverts commit fc2db3cb6a
.
This commit is contained in:
parent
c2669b1d33
commit
0f9a57199f
11
bot.py
11
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
|
||||
|
|
Loading…
Reference in New Issue