add developer and bofh excuse generators
This commit is contained in:
parent
aa4e51ae37
commit
3b079a3c5c
|
@ -15,6 +15,8 @@ import requests
|
|||
import html
|
||||
import arrr
|
||||
from bs4 import BeautifulSoup
|
||||
import os
|
||||
import random
|
||||
|
||||
try:
|
||||
from supybot.i18n import PluginInternationalization
|
||||
|
@ -213,4 +215,15 @@ class Fun(callbacks.Plugin):
|
|||
irc.reply(" ".join(l))
|
||||
piglatin = wrap(piglatin, [('text')])
|
||||
|
||||
def bofh(self, irc, msg, args):
|
||||
"""
|
||||
BOFH Excuse Generator
|
||||
"""
|
||||
data = open("{0}/excuses.txt".format(os.path.dirname(os.path.abspath(__file__))))
|
||||
text = data.read()
|
||||
reply = text.splitlines()
|
||||
excuse = random.randrange(0, len(reply))
|
||||
irc.reply(reply[excuse])
|
||||
bofh = wrap(bofh)
|
||||
|
||||
Class = Fun
|
||||
|
|
Loading…
Reference in New Issue