[Server] Fix crash

master
Sfan5 2013-02-14 21:38:34 +01:00
parent 45cfd0fb2e
commit 225b2e8d61
1 changed files with 4 additions and 4 deletions

View File

@ -8,10 +8,6 @@ import web, math, random
from xml.dom import minidom
def read_server():
for x in phenny.bot.commands["high"].values():
if x[0].__name__ == "aa_hook":
if x[0](phenny, input):
return # Abort function
bytes = web.get("http://servers.minetest.ru/")
shim = '<table>'
shim2 = '</table>'
@ -37,6 +33,10 @@ def format(name,addr,status,statuspercent):
else:
return "%s | %s %s" % (name,addr,status)
def server(phenny, input):
for x in phenny.bot.commands["high"].values():
if x[0].__name__ == "aa_hook":
if x[0](phenny, input):
return # Abort function
phenny.reply(read_server())
server.commands = ['sv', 'server']