Merge branch 'develop' of github.com:ClouDev/CloudBot into develop
This commit is contained in:
commit
ad3db1d036
2 changed files with 6 additions and 6 deletions
|
@ -48,7 +48,7 @@ def itemid(input, reply=None):
|
||||||
input = input.lower().strip()
|
input = input.lower().strip()
|
||||||
|
|
||||||
if input == "":
|
if input == "":
|
||||||
reply("No input.")
|
reply("error: no input.")
|
||||||
return
|
return
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
@ -58,7 +58,7 @@ def itemid(input, reply=None):
|
||||||
results.append("\x02[%s]\x02 %s" % (id, name))
|
results.append("\x02[%s]\x02 %s" % (id, name))
|
||||||
|
|
||||||
if not len(results):
|
if not len(results):
|
||||||
reply("No matches found.")
|
reply("error: No matches found.")
|
||||||
return
|
return
|
||||||
|
|
||||||
out = ", ".join(results)
|
out = ", ".join(results)
|
||||||
|
@ -83,11 +83,11 @@ def recipe(input, reply=None):
|
||||||
results.append(recipe.line)
|
results.append(recipe.line)
|
||||||
|
|
||||||
if not len(results):
|
if not len(results):
|
||||||
reply("No matches found.")
|
reply("error: no matches found.")
|
||||||
return
|
return
|
||||||
|
|
||||||
if len(results) > 3:
|
if len(results) > 3:
|
||||||
reply("Too many results (%s)" % len(results))
|
reply("error: too many results (%s)" % len(results))
|
||||||
return
|
return
|
||||||
|
|
||||||
for result in results:
|
for result in results:
|
||||||
|
|
|
@ -62,7 +62,7 @@ from util import hook
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def mcping(inp):
|
def mcping(inp):
|
||||||
".mcping server[:port] - Ping a Minecraft server to check status."
|
".mcping <server>[:port] - Ping a Minecraft server to check status."
|
||||||
inp = inp.strip().split(" ")[0]
|
inp = inp.strip().split(" ")[0]
|
||||||
|
|
||||||
if ":" in inp:
|
if ":" in inp:
|
||||||
|
@ -70,7 +70,7 @@ def mcping(inp):
|
||||||
try:
|
try:
|
||||||
port = int(port)
|
port = int(port)
|
||||||
except:
|
except:
|
||||||
return "Invalid port!"
|
return "error: invalid port!"
|
||||||
else:
|
else:
|
||||||
host = inp
|
host = inp
|
||||||
port = 25565
|
port = 25565
|
||||||
|
|
Reference in a new issue