
Untitled
By: a guest on
Aug 22nd, 2012 | syntax:
Python | size: 0.63 KB | hits: 19 | expires: Never
from util import hook
from util import http
from urllib import quote_plus
#let me google that for you plugin
@hook.command('gfy')
@hook.command('lmgtfy')
@hook.command
def googleit(inp, say=None, me=None, nick=None):
".lmgtfy (user)! [phrase] - Posts a google link for the specified phrase"
if inp.find('!')==-1:
phraseP = quote_plus(inp)
url = "http://lmgtfy.com/?q=" + phraseP
say(url)
else:
split = inp.split("! ")
phrase = split[1]
user = split[0]
phraseP = quote_plus(phrase)
url = "http://lmgtfy.com/?q=" + phraseP
say(user + "! " + url)