Forgot to remove debug lines
This commit is contained in:
parent
cf7658d28e
commit
0f689f4583
1 changed files with 0 additions and 4 deletions
|
@ -3,7 +3,6 @@ import socket
|
||||||
import json
|
import json
|
||||||
import struct
|
import struct
|
||||||
import DNS ## Please remember to install the dependancy 'pydns'
|
import DNS ## Please remember to install the dependancy 'pydns'
|
||||||
import time
|
|
||||||
|
|
||||||
def mccolorconvert(motd):
|
def mccolorconvert(motd):
|
||||||
empty = ""
|
empty = ""
|
||||||
|
@ -45,11 +44,9 @@ def mcping_connect(host, port):
|
||||||
", is it up? Double-check your address!"
|
", is it up? Double-check your address!"
|
||||||
|
|
||||||
def srvData(domain):
|
def srvData(domain):
|
||||||
starttime = time.time()
|
|
||||||
DNS.ParseResolvConf()
|
DNS.ParseResolvConf()
|
||||||
srv_req = DNS.Request(qtype = 'srv')
|
srv_req = DNS.Request(qtype = 'srv')
|
||||||
srv_result = srv_req.req('_minecraft._tcp.%s' % domain)
|
srv_result = srv_req.req('_minecraft._tcp.%s' % domain)
|
||||||
print time.time() - starttime
|
|
||||||
|
|
||||||
for getsrv in srv_result.answers:
|
for getsrv in srv_result.answers:
|
||||||
if getsrv['typename'] == 'SRV':
|
if getsrv['typename'] == 'SRV':
|
||||||
|
@ -133,7 +130,6 @@ def mcping(inp):
|
||||||
rdata = mccolorconvert(mcping_connect(host, port))
|
rdata = mccolorconvert(mcping_connect(host, port))
|
||||||
|
|
||||||
if 'is it up' in rdata:
|
if 'is it up' in rdata:
|
||||||
print "Default Down, Checking SRV"
|
|
||||||
getdata = srvData(inp)
|
getdata = srvData(inp)
|
||||||
try:
|
try:
|
||||||
host = str(getdata[1])
|
host = str(getdata[1])
|
||||||
|
|
Reference in a new issue