Spelling, docstrings
This commit is contained in:
parent
a76ff29d4b
commit
004ceb79fc
|
@ -108,7 +108,7 @@ def info(inp, notice=None, db=None):
|
||||||
|
|
||||||
@hook.regex(r'^\? ?(.+)')
|
@hook.regex(r'^\? ?(.+)')
|
||||||
def factoid(inp, message=None, db=None, bot=None, action=None, conn=None, input=None):
|
def factoid(inp, message=None, db=None, bot=None, action=None, conn=None, input=None):
|
||||||
"?<word> -- Shows what data is associated with <word>."
|
"""?<word> -- Shows what data is associated with <word>."""
|
||||||
try:
|
try:
|
||||||
prefix_on = bot.config["plugins"]["factoids"].get("prefix", False)
|
prefix_on = bot.config["plugins"]["factoids"].get("prefix", False)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|
|
@ -14,7 +14,7 @@ with open("./plugins/data/geoip_regions.json", "rb") as f:
|
||||||
regions = json.loads(f.read())
|
regions = json.loads(f.read())
|
||||||
|
|
||||||
if os.path.isfile(os.path.abspath("./plugins/data/GeoLiteCity.dat")):
|
if os.path.isfile(os.path.abspath("./plugins/data/GeoLiteCity.dat")):
|
||||||
# initalise geolocation database
|
# initialise geolocation database
|
||||||
geo = pygeoip.GeoIP(os.path.abspath("./plugins/data/GeoLiteCity.dat"))
|
geo = pygeoip.GeoIP(os.path.abspath("./plugins/data/GeoLiteCity.dat"))
|
||||||
else:
|
else:
|
||||||
download = http.get("http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz")
|
download = http.get("http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz")
|
||||||
|
|
|
@ -8,7 +8,7 @@ from util import hook
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import DNS
|
import DNS
|
||||||
# Please remember to install the dependancy 'pydns'
|
# Please remember to install the dependency 'pydns'
|
||||||
pydns_installed = True
|
pydns_installed = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pydns_installed = False
|
pydns_installed = False
|
||||||
|
|
|
@ -20,7 +20,7 @@ def ping(inp, reply=None):
|
||||||
args = inp.split(' ')
|
args = inp.split(' ')
|
||||||
host = args[0]
|
host = args[0]
|
||||||
|
|
||||||
# check for a seccond argument and set the ping count
|
# check for a second argument and set the ping count
|
||||||
if len(args) > 1:
|
if len(args) > 1:
|
||||||
count = int(args[1])
|
count = int(args[1])
|
||||||
if count > 20:
|
if count > 20:
|
||||||
|
|
|
@ -91,7 +91,7 @@ def tell(inp, nick='', chan='', db=None, input=None, notice=None):
|
||||||
return
|
return
|
||||||
|
|
||||||
if user_to.lower() == input.conn.nick.lower():
|
if user_to.lower() == input.conn.nick.lower():
|
||||||
# user is looking for us, being a smartass
|
# user is looking for us, being a smart-ass
|
||||||
notice("Thanks for the message, {}!".format(user_from))
|
notice("Thanks for the message, {}!".format(user_from))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
pygeoip
|
||||||
|
tweepy
|
||||||
Crypto
|
Crypto
|
||||||
BeautifulSoup==3.2.1
|
BeautifulSoup==3.2.1
|
||||||
lxml==3.1beta1
|
lxml==3.1beta1
|
||||||
|
|
Reference in New Issue