test sync
This commit is contained in:
parent
6f6aa28cee
commit
2a9aa2419d
|
@ -13,7 +13,7 @@ def urban(inp):
|
|||
defs = page['list']
|
||||
|
||||
if page['result_type'] == 'no_results':
|
||||
return 'not found.'
|
||||
return 'Not found.'
|
||||
|
||||
out = defs[0]['word'] + ': ' + defs[0]['definition']
|
||||
|
||||
|
@ -44,7 +44,7 @@ def define(inp):
|
|||
|
||||
correction = h.xpath('//span[@class="correct-word"]/text()')
|
||||
if correction:
|
||||
result = 'definition for "%s": ' % correction[0]
|
||||
result = 'Definition for "%s": ' % correction[0]
|
||||
|
||||
sections = []
|
||||
for section in definition:
|
||||
|
|
|
@ -6,7 +6,6 @@ fortunes = ["Help! I'm stuck in the fortune cookie factory!",
|
|||
"He who laughs at himself never runs out of things to laugh at.",
|
||||
"The world is your oyster.",
|
||||
"Today will be a good day.",
|
||||
"Only listen to the Hoss Fortune Cookies. Disregard all other fortune telling units.",
|
||||
"Life's short, party naked.",
|
||||
"Haters gonna hate.",
|
||||
"You are amazing and let no one tell you otherwise.",
|
||||
|
|
|
@ -4,8 +4,11 @@ import string
|
|||
@hook.command(autohelp=False)
|
||||
def mcstatus(inp, bot=None):
|
||||
".mcstatus - Attempts to log in to minecraft"
|
||||
username = bot.config["api_keys"]["mc_user"]
|
||||
password = bot.config["api_keys"]["mc_pass"]
|
||||
username = bot.config.get("api_keys", {}).get("mc_user", None)
|
||||
password = bot.config.get("api_keys", {}).get("mc_pass", None)
|
||||
if api_key is None:
|
||||
return "error: no api key set"
|
||||
|
||||
login = http.get("https://login.minecraft.net/?user="+username+"&password="+password+"&version=13")
|
||||
if username.lower() in login.lower():
|
||||
return "Minecraft login servers appear to be online!"
|
||||
|
|
|
@ -133,7 +133,7 @@ class WhoisOrg(WhoisEntry):
|
|||
'registrar': 'Registrar:\s?(.+)',
|
||||
'whois_server': 'Whois Server:\s?(.+)',
|
||||
'referral_url': 'Referral URL:\s?(.+)', # http url of whois_server
|
||||
'updated_date': 'Updated Date:\s?(.+)',
|
||||
'updated_date': 'Last Updated On:\s?(.+)',
|
||||
'creation_date': 'Created On:\s?(.+)',
|
||||
'expiration_date': 'Expiration Date:\s?(.+)',
|
||||
'name_servers': 'Name Server:\s?(.+)', # list of name servers
|
||||
|
|
|
@ -9,11 +9,31 @@ def whois(inp, say=None):
|
|||
|
||||
print w
|
||||
|
||||
domain_name = w.domain_name[0]
|
||||
expiration_date = w.expiration_date[0]
|
||||
creation_date = w.creation_date[0]
|
||||
registrant_email = w.emails[0]
|
||||
administrative_email = w.emails[1]
|
||||
try:
|
||||
domain_name = w.domain_name[0]
|
||||
except IndexError, e:
|
||||
domain_name: "none."
|
||||
|
||||
try:
|
||||
expiration_date = w.expiration_date[0]
|
||||
except IndexError, e:
|
||||
expiration_date: "none."
|
||||
|
||||
try:
|
||||
creation_date = w.creation_date[0]
|
||||
except IndexError, e:
|
||||
creation_date: "none."
|
||||
|
||||
try:
|
||||
registrant_email = w.emails[0]
|
||||
except:
|
||||
registrant_email: "none."
|
||||
|
||||
try:
|
||||
administrative_email = w.emails[1]
|
||||
except:
|
||||
administrative_email: "none."
|
||||
|
||||
say('Domain recognised! %s was registered on \x02%s\x02 and will expire on \x02%s\x02' % (domain_name, creation_date, expiration_date))
|
||||
say('Registrant email: %s Administrative email: %s' % (registrant_email, administrative_email))
|
||||
|
||||
|
|
Reference in a new issue