diff --git a/volaparrot/commands/tard.py b/volaparrot/commands/tard.py index 313a0c3..a86b8a6 100644 --- a/volaparrot/commands/tard.py +++ b/volaparrot/commands/tard.py @@ -34,7 +34,8 @@ from .command import Command -__all__ = ["EightballCommand", "RevolverCommand", "DiceCommand", "ChenCommand", "XDanielCommand"] +__all__ = ["EightballCommand", "RevolverCommand", "DiceCommand", "ChenCommand", "XDanielCommand", + "DotCommand"] logger = logging.getLogger(__name__) @@ -143,6 +144,13 @@ def __call__(self, cmd, remainder, msg): self.post("{}: M{}RC", user, "E" * min(50, max(1, cmd.lower().count("e")))) return True +class DotCommand(Command): + handlers = "...", "....", "....." + + def __call__(self, cmd, remainder, msg): + self.post("{} = gay".format(msg.nick)) + return True + class ProfanityCommand(Command): extract = re.compile(r"1:.*?\s+warning\s+(.*?)\s\S+$") handlers = "!analyze", "!sjw", "!profanity" diff --git a/volaparrot/commands/web.py b/volaparrot/commands/web.py index 9ea02f2..68058f9 100644 --- a/volaparrot/commands/web.py +++ b/volaparrot/commands/web.py @@ -227,6 +227,15 @@ def onurl(self, url, msg): imgs = [html.unescape(i.group(1)) for i in self.images.finditer(resp) if "profile_images" not in i.group(1)] + + # Not very elegant but at least it works :^) + for i in range(0, len(imgs)): + if not re.match(":orig$", imgs[i], re.I): + if imgs[i].find(":") != imgs[i].rfind(":"): + imgs[i] = imgs[i][:imgs[i].rfind(":")] + + imgs[i] += ":orig" + imgs = " ".join(imgs) if imgs: info = "{title}:\n{desc}\n{imgs}".format(title=title, desc=desc, imgs=imgs)