|
|
@ -92,17 +92,17 @@ def mumbles( request, mobile=False ): |
|
|
|
|
|
|
|
@EXT_DIRECT_PROVIDER.register_method( "MumbleList" ) |
|
|
|
def servers( request ): |
|
|
|
mms = Mumble.objects.all().order_by( "name" ).values( "id", "name" ) |
|
|
|
|
|
|
|
return [{ 'id': mm['id'], 'name': mm['name'] } for mm in mms] |
|
|
|
mms = Mumble.objects.all().order_by( "name" ) |
|
|
|
return [{ 'id': mm.id, 'name': mm.name, 'booted': mm.booted } for mm in mms] |
|
|
|
|
|
|
|
@EXT_DIRECT_PROVIDER.register_method( "MumbleList" ) |
|
|
|
def serverinfo( request, server ): |
|
|
|
srv = Mumble.objects.get( id=int(server) ) |
|
|
|
# users_regged users_online channel_cnt uptime upsince minurl |
|
|
|
if srv.booted: |
|
|
|
return { |
|
|
|
'id': srv.id, |
|
|
|
'name': srv.name, |
|
|
|
'booted': True, |
|
|
|
'motd': srv.motd, |
|
|
|
'connecturl': srv.connecturl, |
|
|
|
'prettyversion': srv.prettyversion, |
|
|
@ -115,10 +115,14 @@ def serverinfo( request, server ): |
|
|
|
'minurl': reverse( mobile_show, args=(server,) ), |
|
|
|
'detailsurl': reverse( show, args=(server,) ), |
|
|
|
} |
|
|
|
|
|
|
|
@EXT_DIRECT_PROVIDER.register_method( "MumbleList" ) |
|
|
|
def serverurl( request, server ): |
|
|
|
return reverse( show, args=(int(server),) ); |
|
|
|
else: |
|
|
|
return{ |
|
|
|
'id': srv.id, |
|
|
|
'name': srv.name, |
|
|
|
'booted': False, |
|
|
|
'minurl': reverse( mobile_show, args=(server,) ), |
|
|
|
'detailsurl': reverse( show, args=(server,) ), |
|
|
|
} |
|
|
|
|
|
|
|
def show( request, server ): |
|
|
|
""" Display the channel list for the given Server ID. |
|
|
|