Awesome IRC bot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
591 B

5 years ago
#!/usr/bin/env python
.. module:: PressF
:synopsis: Press F to pay respects
.. moduleauthor:: Dave Pedu <>
from pyircbot.modulebase import ModuleBase, regex
from time import time
class PressF(ModuleBase):
def __init__(self, bot, moduleName):
ModuleBase.__init__(self, bot, moduleName)
self.last = 0
@regex(r'\bF\b', types=['PRIVMSG'], allow_private=False)
5 years ago
def respect(self, msg, cmd):
if time() - self.last > self.config.get("delay", 5):
self.last = time()[0], "F")