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+=" "
|
prefix+=" "
|
||||||
if self.hostmask:
|
if self.hostmask:
|
||||||
prefix+=":{} ".format(self.hostmask)
|
prefix+=":{} ".format(self.hostmask)
|
||||||
# handle automatically adding a colon if the last parameter has spaces in it
|
return prefix+" ".join([self.command]+self.params)+"\r\n"
|
||||||
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"
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def parse_line(cls,line):
|
def parse_line(cls,line):
|
||||||
parts = line.split()
|
parts = line.split()
|
||||||
|
@ -84,7 +77,7 @@ class IRCLine:
|
||||||
hostmask=parts.pop(0)[1:]
|
hostmask=parts.pop(0)[1:]
|
||||||
i=len(parts)-1
|
i=len(parts)-1
|
||||||
while i>0 and not parts[i].startswith(":"): i-=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)
|
return cls(*parts,tags=tags,hostmask=hostmask)
|
||||||
def encode(self,*args,**kwargs):
|
def encode(self,*args,**kwargs):
|
||||||
# clearly, if we're here, I'm an idiot and am trying to send an
|
# clearly, if we're here, I'm an idiot and am trying to send an
|
||||||
|
|
Loading…
Reference in New Issue