do not specify explicit delimiter for split
this interestingly makes python drop consecutive spaces, so the bot will not store empty "words"
This commit is contained in:
parent
1d915a8e7e
commit
c65bfa0c7d
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ async def rec(self, m):
|
||||||
beg = shared.db['beg']
|
beg = shared.db['beg']
|
||||||
end = shared.db['end']
|
end = shared.db['end']
|
||||||
|
|
||||||
words = m.split(' ')
|
words = m.split()
|
||||||
|
|
||||||
if words[0] == 'admin' or len(words) < 2:
|
if words[0] == 'admin' or len(words) < 2:
|
||||||
return
|
return
|
||||||
|
@ -110,7 +110,7 @@ async def filter(self, c, n, m):
|
||||||
elif '#' not in c and n != self.nickname:
|
elif '#' not in c and n != self.nickname:
|
||||||
await go(self, c, n, m)
|
await go(self, c, n, m)
|
||||||
else:
|
else:
|
||||||
if len(m.split(' ')) > 1:
|
if len(m.split()) > 1:
|
||||||
if shared.learntime + shared.learndelay < time.time():
|
if shared.learntime + shared.learndelay < time.time():
|
||||||
await rec(self, m)
|
await rec(self, m)
|
||||||
shared.learntime = time.time()
|
shared.learntime = time.time()
|
||||||
|
|
Loading…
Reference in a new issue