diff --git a/nxy/plugins/useless.py b/nxy/plugins/useless.py index 6a3bf3b..4d83839 100644 --- a/nxy/plugins/useless.py +++ b/nxy/plugins/useless.py @@ -26,21 +26,21 @@ GNU_LINUX = """I'd Just Like To Interject For A Moment. What you're referring class Useless(Plugin): requires = ['irc3.plugins.command'] - @event(r'(?i)^:.* PRIVMSG (?P.*) :' + @event(r'(?i)^:\S+ PRIVMSG (?P\S+) :' r'.*(?.*) :(?Phuehuehue)$') - def huehuehue(self, channel: str, data: str): - self.bot.privmsg(channel, data) + @event(r'(?i)^:\S+ PRIVMSG (?P\S+) :(?Phuehuehue)$') + def huehuehue(self, channel: str, msg: str): + self.bot.privmsg(channel, msg) - @event(r'(?i)^:.* PRIVMSG (?P.*) :same$') + @event(r'(?i)^:\S+ PRIVMSG (?P\S+) :same$') def same(self, channel: str): self.bot.privmsg(channel, 'same') - @event(r'(?i)^:.* PRIVMSG (?P.*) :\[(?P.*)\]$') + @event(r'(?i)^:\S+ PRIVMSG (?P\S+) :\[(?P.*)\]$') def intensifies(self, channel: str, data: str): self.bot.privmsg(channel, fmt('{bold}[{data} INTENSIFIES]', data=data.upper())) @@ -48,7 +48,7 @@ class Useless(Plugin): @command def storyofpomfface(self, mask: IrcString, channel: IrcString, args: DocOptDict): - """Story of pomf face + """Story of pomf face. %%storyofpomfface """ @@ -57,7 +57,7 @@ class Useless(Plugin): @command def jn(self, mask: IrcString, channel: IrcString, args: DocOptDict): - """Decides between yes and no (for a question) + """Decides between yes and no (for a question). %%jn %%jn @@ -67,7 +67,7 @@ class Useless(Plugin): @command def kiss(self, mask: IrcString, channel: IrcString, args: DocOptDict): - """Kisses a user + """Kisses a user. %%kiss """ @@ -77,7 +77,7 @@ class Useless(Plugin): @command def hug(self, mask: IrcString, channel: IrcString, args: DocOptDict) -> str: - """Hugs a user + """Hugs a user. %%hug """ @@ -86,14 +86,12 @@ class Useless(Plugin): @command def hack(self, mask: IrcString, channel: IrcString, args: DocOptDict): - """Hacks (a user) + """Hacks (a user). %%hack [] """ nick = args.get('') or '' - if nick: - nick = ' {nick}'.format(nick=nick) - return 'hacking{nick}...'.format(nick=nick) + return 'hacking{}...'.format(' %s' % nick if nick else '') @command def gay(self, mask: IrcString, channel: IrcString, args: DocOptDict): @@ -105,7 +103,7 @@ class Useless(Plugin): @command def rainbow(self, mask: IrcString, channel: IrcString, args: DocOptDict): - """Colorize a word in rainbow colors + """Colorize a word in rainbow colors. %%rainbow ... """ @@ -120,7 +118,7 @@ class Useless(Plugin): @command def wrainbow(self, mask: IrcString, channel: IrcString, args: DocOptDict): - """Colorize words in a sentence with rainbow colors + """Colorize words in a sentence with rainbow colors. %%wrainbow ... """