added message to ping

This commit is contained in:
neersighted 2012-02-29 19:12:30 -08:00
parent 648d8061f2
commit d72cd13a13

View file

@ -5,7 +5,7 @@ import re
@hook.command
def ping(inp):
def ping(inp, reply=None):
".ping <host> [count] -- Pings <host> [count] times."
args = inp.split(' ')
@ -21,6 +21,8 @@ def ping(inp):
count = str(count)
reply("Attempting to ping %s %s times..." % (host, count))
pingcmd = subprocess.check_output("ping -c "\
+ count + " " + host, shell=True)
if 'request timed out' in pingcmd or 'unknown host' in pingcmd: