From 0a119dbec3e4e6a1ecf5904a6ea24e4a1f71da09 Mon Sep 17 00:00:00 2001 From: mrhanky Date: Tue, 30 May 2017 12:56:20 +0200 Subject: [PATCH] Useless plugin done --- nxy/plugins/useless.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nxy/plugins/useless.py b/nxy/plugins/useless.py index f6f115f..1ab4ad0 100644 --- a/nxy/plugins/useless.py +++ b/nxy/plugins/useless.py @@ -18,14 +18,17 @@ class Useless(Plugin): @irc3.event(r'(?i)^:\S+ PRIVMSG (?P\S+) :(?Phuehuehue)$') def huehuehue(self, channel: str, msg: str): + """Returns a huehuehue when someone writes it.""" self.bot.privmsg(channel, msg) @irc3.event(r'(?i)^:\S+ PRIVMSG (?P\S+) :same$') def same(self, channel: str): + """Returns a plain same when a user writes same.""" self.bot.privmsg(channel, 'same') @irc3.event(r'(?i)^:\S+ PRIVMSG (?P\S+) :\[(?P.*)\]$') def intensifies(self, channel: str, msg: str): + """String with brackets around will be returned with INTENSIFIES.""" self.bot.privmsg(channel, '\x02[{msg} INTENSIFIES]'.format( msg=msg.upper())) @@ -103,7 +106,7 @@ class Useless(Plugin): """ last = 0 word = [] - for i, char in enumerate(' '.join(args.get(''))): + for char in ' '.join(args.get('')): if char != ' ': char = self._rainbow(last, char) last += 1