mirror of
git://git.acid.vegas/scroll.git
synced 2024-11-07 08:46:45 +00:00
Fixed line stripping
This commit is contained in:
parent
a57316332f
commit
36fce2ff81
@ -156,12 +156,11 @@ class Bot():
|
|||||||
else:
|
else:
|
||||||
await self.action(chan, 'the ascii gods have chosen... ' + color(name, cyan))
|
await self.action(chan, 'the ascii gods have chosen... ' + color(name, cyan))
|
||||||
for line in ascii:
|
for line in ascii:
|
||||||
line = line.replace('\n','').replace('\r','')
|
|
||||||
try:
|
try:
|
||||||
line = line.decode()
|
line = line.decode()
|
||||||
except:
|
except:
|
||||||
line = line.encode(chardet.detect(line)['encoding']).decode() # Get fucked UTF-16
|
line = line.encode(chardet.detect(line)['encoding']).decode() # Get fucked UTF-16
|
||||||
await self.sendmsg(chan, line + reset)
|
await self.sendmsg(chan, line.replace('\n','').replace('\r','') + reset)
|
||||||
await asyncio.sleep(self.settings['msg'])
|
await asyncio.sleep(self.settings['msg'])
|
||||||
else:
|
else:
|
||||||
await self.irc_error(chan, 'invalid name', name)
|
await self.irc_error(chan, 'invalid name', name)
|
||||||
|
Loading…
Reference in New Issue
Block a user