Browse Source

display total number and number of free slots. see #138

Natenom/support-murmur-13-1446181288462
Michael Ziegler 14 years ago
parent
commit
f56857b9ff
  1. 3
      pyweb/mumble/media/js/rendermumbleserver.js
  2. 1
      pyweb/mumble/views.py

3
pyweb/mumble/media/js/rendermumbleserver.js

@ -15,6 +15,9 @@ function renderserverinfos( server ){
buf.push( interpolate(
ngettext( "Currently, %s user is online.", "Currently, %s users are online.", server.users_online ),
[server.users_online] ) );
buf.push( interpolate(
gettext("This server has %s slots, %s of which are free."), [server.users, (server.users - server.users_online)]
) );
buf.push( interpolate(
ngettext( "Currently, there is %s channel.", "Currently, there are %s channels.", server.channel_cnt ),
[server.channel_cnt] ) );

1
pyweb/mumble/views.py

@ -112,6 +112,7 @@ def serverinfo( request, server ):
'connecturl': srv.connecturl,
'prettyversion': srv.prettyversion,
'url': srv.url,
'users': (srv.users or srv.server.getDefaultConf()['users']),
'users_regged': srv.users_regged,
'users_online': srv.users_online,
'channel_cnt': srv.channel_cnt,

Loading…
Cancel
Save