Show mumble server version
This commit is contained in:
parent
ce6413f53e
commit
72e1d71a0a
1 changed files with 4 additions and 2 deletions
|
@ -25,10 +25,12 @@ class Module(ModuleManager.BaseModule):
|
||||||
pong_packet = s.recv(24)
|
pong_packet = s.recv(24)
|
||||||
pong = struct.unpack(">bbbbQiii", pong_packet)
|
pong = struct.unpack(">bbbbQiii", pong_packet)
|
||||||
|
|
||||||
|
version = ".".join(str(v) for v in pong[1:4])
|
||||||
ping = (datetime.datetime.utcnow().microsecond-timestamp)/1000
|
ping = (datetime.datetime.utcnow().microsecond-timestamp)/1000
|
||||||
users = pong[5]
|
users = pong[5]
|
||||||
max_users = pong[6]
|
max_users = pong[6]
|
||||||
bandwidth = pong[7]/1000 # kbit/s
|
bandwidth = pong[7]/1000 # kbit/s
|
||||||
|
|
||||||
event["stdout"].write("%s: %d/%d users, %.1fms ping, %dkbit/s bandwidth"
|
event["stdout"].write(
|
||||||
% (server, users, max_users, ping, bandwidth))
|
"%s (v%s): %d/%d users, %.1fms ping, %dkbit/s bandwidth"
|
||||||
|
% (server, version, users, max_users, ping, bandwidth))
|
||||||
|
|
Loading…
Reference in a new issue