Random tweaks
This commit is contained in:
parent
cb9129aebc
commit
9d0e704eae
4 changed files with 12 additions and 22 deletions
|
@ -10,14 +10,13 @@ shivs <who> in the <body>.
|
||||||
rams a rocket launcher up <who>'s ass and lets off a few rounds.
|
rams a rocket launcher up <who>'s ass and lets off a few rounds.
|
||||||
crushes <who>'s skull in with a spiked mace.
|
crushes <who>'s skull in with a spiked mace.
|
||||||
unleashes the armies of Isengard on <who>.
|
unleashes the armies of Isengard on <who>.
|
||||||
packs <who> into a SVN repo.
|
|
||||||
slices <who>'s <body> off with a Katana.
|
slices <who>'s <body> off with a Katana.
|
||||||
throws <who> to Cthulu!
|
throws <who> to Cthulu and watches them get ripped to shreads.
|
||||||
feeds <who> to an owlbear.
|
feeds <who> to an owlbear, who proceeds to maul them.
|
||||||
turns <who> into a snail and salts them.
|
turns <who> into a snail and salts them.
|
||||||
snacks on <who>'s <body>.
|
snacks on <who>'s <body>.
|
||||||
puts <who> into a sack, throws the sack in the river, and hurls the river into space.
|
puts <who> into a sack, throws the sack in the river, and hurls the river into space.
|
||||||
goes bowling with <who>'s head.
|
goes bowling with <who>'s disembodied head.
|
||||||
uses <who>'s <body> as a back-scratcher.
|
uses <who>'s <body> as a back-scratcher.
|
||||||
sends <who> to /dev/null!
|
sends <who> to /dev/null!
|
||||||
feeds <who> coke and mentos till they pop!
|
feeds <who> coke and mentos till they violently explode.
|
||||||
|
|
|
@ -102,5 +102,4 @@ dances upon the grave of <who>'s ancestors.
|
||||||
farts in <who>'s general direction.
|
farts in <who>'s general direction.
|
||||||
flogs <who> with stinging nettle.
|
flogs <who> with stinging nettle.
|
||||||
intoduces <who> to the Knights who say Ni.
|
intoduces <who> to the Knights who say Ni.
|
||||||
assigns all of the permissions tickets on the BeastNode support system to <who>.
|
|
||||||
hands <who> a poison ivy joint.
|
hands <who> a poison ivy joint.
|
||||||
|
|
|
@ -11,12 +11,7 @@ with open("plugins/data/fortunes.txt") as f:
|
||||||
fortunes.append(line.strip())
|
fortunes.append(line.strip())
|
||||||
|
|
||||||
|
|
||||||
@hook.command(autohelp=False)
|
@hook.command
|
||||||
def fortune(inp, nick=None, say=None, input=None):
|
def fortune(inp):
|
||||||
".fortune -- Fortune cookies on demand."
|
".fortune -- Fortune cookies on demand."
|
||||||
|
return random.choice(fortunes)
|
||||||
msg = "(" + nick + ") " + random.choice(fortunes)
|
|
||||||
if inp:
|
|
||||||
msg = "(@" + inp + ") " + random.choice(fortunes)
|
|
||||||
|
|
||||||
say(msg)
|
|
||||||
|
|
|
@ -9,6 +9,8 @@ import locale
|
||||||
import datetime
|
import datetime
|
||||||
from BeautifulSoup import BeautifulSoup
|
from BeautifulSoup import BeautifulSoup
|
||||||
|
|
||||||
|
tags_re = re.compile(r'<[^<]*?>')
|
||||||
|
|
||||||
TimeZones = {'KST': 9, 'CADT': 10.5, 'EETDST': 3, 'MESZ': 2, 'WADT': 9,
|
TimeZones = {'KST': 9, 'CADT': 10.5, 'EETDST': 3, 'MESZ': 2, 'WADT': 9,
|
||||||
'EET': 2, 'MST': -7, 'WAST': 8, 'IST': 5.5, 'B': 2,
|
'EET': 2, 'MST': -7, 'WAST': 8, 'IST': 5.5, 'B': 2,
|
||||||
'MSK': 3, 'X': -11, 'MSD': 4, 'CETDST': 2, 'AST': -4,
|
'MSK': 3, 'X': -11, 'MSD': 4, 'CETDST': 2, 'AST': -4,
|
||||||
|
@ -224,21 +226,16 @@ def get_time(tz):
|
||||||
|
|
||||||
|
|
||||||
@hook.command("time")
|
@hook.command("time")
|
||||||
def timecommand(inp, say=None):
|
def time_command(inp):
|
||||||
".time <area> -- Gets the time in <area>"
|
".time <area> -- Gets the time in <area>"
|
||||||
|
|
||||||
tags_re = re.compile(r'<[^<]*?>')
|
request = http.get('http://www.google.com/search', q="time in " + inp)
|
||||||
|
soup = BeautifulSoup(request)
|
||||||
page = http.get('http://www.google.com/search', q="time in " + inp)
|
|
||||||
|
|
||||||
soup = BeautifulSoup(page)
|
|
||||||
|
|
||||||
response = soup.find('td', {'style': 'font-size:medium'})
|
response = soup.find('td', {'style': 'font-size:medium'})
|
||||||
|
|
||||||
if response:
|
if response:
|
||||||
output = response.renderContents()
|
output = response.renderContents()
|
||||||
output = tags_re.sub('\x02', output.strip())
|
output = tags_re.sub('\x02', output.strip())
|
||||||
|
|
||||||
return output
|
return output
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
|
Reference in a new issue