remove scroll site limitations

This commit is contained in:
Gordon Shumway 2019-05-11 18:47:34 -04:00 committed by GitHub
parent a71c62ee24
commit 3ad1a7c00f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -477,13 +477,11 @@ class ASCII(callbacks.Plugin):
if "<!DOCTYPE html>" in file[:10]: if "<!DOCTYPE html>" in file[:10]:
irc.reply("Error: ansi2irc requires a text file as input.", private=False, notice=False) irc.reply("Error: ansi2irc requires a text file as input.", private=False, notice=False)
return return
elif url.endswith(".txt") or url.startswith("https://pastebin.com/raw/") or url.startswith("https://paste.ee/r/"): else:
for line in file: for line in file:
if line.strip() and not self.stopped[msg.args[0]]: if line.strip() and not self.stopped[msg.args[0]]:
time.sleep(delay) time.sleep(delay)
irc.reply(line, prefixNick = False, noLengthCheck=True, private=False, notice=False) irc.reply(line, prefixNick = False, noLengthCheck=True, private=False, notice=False)
else:
irc.reply("Unexpected file type or link format", private=False, notice=False)
scroll = wrap(scroll, [getopts({'delay':'float'}), ('text')]) scroll = wrap(scroll, [getopts({'delay':'float'}), ('text')])
def a2m(self, irc, msg, args, optlist, url): def a2m(self, irc, msg, args, optlist, url):