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 django.conf import settings
|
||||||
|
|
||||||
from services.managers.util.ts3 import TS3Server
|
from services.managers.util.ts3 import TS3Server
|
||||||
@ -83,9 +85,13 @@ class Teamspeak3Manager:
|
|||||||
server = Teamspeak3Manager.__get_created_server()
|
server = Teamspeak3Manager.__get_created_server()
|
||||||
group_cache = server.send_command('servergrouplist')
|
group_cache = server.send_command('servergrouplist')
|
||||||
outlist = {}
|
outlist = {}
|
||||||
for group in group_cache:
|
if type(group_cache) is types.DictType:
|
||||||
outlist[group['keys']['name']] = group['keys']['sgid']
|
for group in group_cache:
|
||||||
return outlist
|
outlist[group['keys']['name']] = group['keys']['sgid']
|
||||||
|
else:
|
||||||
|
print '1024 error'
|
||||||
|
|
||||||
|
print outlist
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _add_user_to_group(uid, groupname):
|
def _add_user_to_group(uid, groupname):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user