mirror of
git://git.acid.vegas/scroll.git
synced 2024-11-21 15:46:39 +00:00
Check line legnth on .ascii img to prevent large image conversions outside of #scroll
This commit is contained in:
parent
f3221bce35
commit
357dc5db4d
@ -249,9 +249,12 @@ class Bot():
|
||||
await self.irc_error(chan, 'failed to convert image', ex)
|
||||
else:
|
||||
if ascii:
|
||||
for line in ascii:
|
||||
await self.sendmsg(chan, line)
|
||||
await asyncio.sleep(self.settings['msg'])
|
||||
if len(ascii) <= self.settings['lines']:
|
||||
for line in ascii:
|
||||
await self.sendmsg(chan, line)
|
||||
await asyncio.sleep(self.settings['msg'])
|
||||
else:
|
||||
await self.irc_error('image is too big', 'take it to #scroll')
|
||||
elif msg == '.ascii list':
|
||||
await self.sendmsg(chan, underline + color('https://raw.githubusercontent.com/ircart/ircart/master/ircart/.list', light_blue))
|
||||
elif msg == '.ascii random':
|
||||
|
Loading…
Reference in New Issue
Block a user