mirror of
git://git.acid.vegas/scroll.git
synced 2024-11-22 08:06: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)
|
await self.irc_error(chan, 'failed to convert image', ex)
|
||||||
else:
|
else:
|
||||||
if ascii:
|
if ascii:
|
||||||
for line in ascii:
|
if len(ascii) <= self.settings['lines']:
|
||||||
await self.sendmsg(chan, line)
|
for line in ascii:
|
||||||
await asyncio.sleep(self.settings['msg'])
|
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':
|
elif msg == '.ascii list':
|
||||||
await self.sendmsg(chan, underline + color('https://raw.githubusercontent.com/ircart/ircart/master/ircart/.list', light_blue))
|
await self.sendmsg(chan, underline + color('https://raw.githubusercontent.com/ircart/ircart/master/ircart/.list', light_blue))
|
||||||
elif msg == '.ascii random':
|
elif msg == '.ascii random':
|
||||||
|
Loading…
Reference in New Issue
Block a user