From 066e9721f901e101284958d96c623b27193e19cc Mon Sep 17 00:00:00 2001 From: Leonardo Date: Sat, 17 Apr 2010 15:11:00 +0200 Subject: [PATCH] Aggiunto check dello stato attuale del client. --- phcstats.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phcstats.py b/phcstats.py index 810687b..ff976da 100755 --- a/phcstats.py +++ b/phcstats.py @@ -95,7 +95,12 @@ def PrintStats(client): ss = ss / (d[-1:][0][0] - d[0][0]) uptime = 100.0 * ss + if IsAlive(client): + is_online = "no" + else: + is_online = "yes" print "Client: %s" % client + print "IsOnline: %s" % is_online print "Uptime: %3.2f %% " % uptime print "----------------------------------------------------" -- 2.1.4