Useless plugin done

This commit is contained in:
mrhanky 2017-05-30 12:56:20 +02:00
parent 96cf435b3c
commit 0a119dbec3
No known key found for this signature in database
GPG Key ID: 67D772C481CB41B8

View File

@ -18,14 +18,17 @@ class Useless(Plugin):
@irc3.event(r'(?i)^:\S+ PRIVMSG (?P<channel>\S+) :(?P<msg>huehuehue)$')
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<channel>\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<channel>\S+) :\[(?P<msg>.*)\]$')
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('<word>'))):
for char in ' '.join(args.get('<word>')):
if char != ' ':
char = self._rainbow(last, char)
last += 1