.
This commit is contained in:
parent
9bc72bc57f
commit
d78f96b3ec
2 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ def bitcoin(inp):
|
||||||
exchanges = {
|
exchanges = {
|
||||||
"mtgox": {
|
"mtgox": {
|
||||||
"api_url": "https://mtgox.com/api/1/BTCUSD/ticker",
|
"api_url": "https://mtgox.com/api/1/BTCUSD/ticker",
|
||||||
"func": lambda data: u"MtGox // Current: \x0307{}\x0f High: \x0307{}\x0f Low: \x0307{}\x0f Best Ask: \x0307{}\x0f Volume: {}".format(data['return']['last']['display'], \
|
"func": lambda data: u"MtGox // Current: \x0307{}\x0f - High: \x0307{}\x0f - Low: \x0307{}\x0f - Best Ask: \x0307{}\x0f - Volume: {}".format(data['return']['last']['display'], \
|
||||||
data['return']['high']['display'], data['return']['low']['display'], data['return']['buy']['display'], \
|
data['return']['high']['display'], data['return']['low']['display'], data['return']['buy']['display'], \
|
||||||
data['return']['vol']['display'])
|
data['return']['vol']['display'])
|
||||||
},
|
},
|
||||||
|
|
|
@ -166,11 +166,11 @@ def mcping(inp):
|
||||||
try:
|
try:
|
||||||
host, port = parse_input(inp)
|
host, port = parse_input(inp)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return ex.args[0]
|
return e.args[0]
|
||||||
try:
|
try:
|
||||||
return mcping_modern(host, port)
|
return mcping_modern(host, port)
|
||||||
except socket.error:
|
except socket.error:
|
||||||
try:
|
try:
|
||||||
return mcping_legacy(host, port)
|
return mcping_legacy(host, port)
|
||||||
except:
|
except:
|
||||||
return "The server {}:{} looks offline from here.".format(host, port)
|
return "The server {} ({}:{}) looks offline from here.".format(inp, host, port)
|
||||||
|
|
Reference in a new issue