mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-13 14:30:17 +02:00
Added check for teamspeak3_manager
This commit is contained in:
parent
a1ae283063
commit
c9bd7afd01
@ -1,3 +1,5 @@
|
||||
import types
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
from services.managers.util.ts3 import TS3Server
|
||||
@ -83,9 +85,13 @@ class Teamspeak3Manager:
|
||||
server = Teamspeak3Manager.__get_created_server()
|
||||
group_cache = server.send_command('servergrouplist')
|
||||
outlist = {}
|
||||
if type(group_cache) is types.DictType:
|
||||
for group in group_cache:
|
||||
outlist[group['keys']['name']] = group['keys']['sgid']
|
||||
return outlist
|
||||
else:
|
||||
print '1024 error'
|
||||
|
||||
print outlist
|
||||
|
||||
@staticmethod
|
||||
def _add_user_to_group(uid, groupname):
|
||||
|
Loading…
x
Reference in New Issue
Block a user