mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Added option to disable corp groups in TS3
This commit is contained in:
@@ -16,7 +16,8 @@ class TS3Service(BaseService):
|
|||||||
'authed_sgid': 12,
|
'authed_sgid': 12,
|
||||||
'name_format': '%(alliance)s - %(corporation)s - %(name)s',
|
'name_format': '%(alliance)s - %(corporation)s - %(name)s',
|
||||||
'bookmark_name': 'TEST Alliance TS3',
|
'bookmark_name': 'TEST Alliance TS3',
|
||||||
'ignore_groups': [6]}
|
'ignore_groups': [6],
|
||||||
|
'corporation_groups': True }
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
@@ -171,14 +172,15 @@ class TS3Service(BaseService):
|
|||||||
self.conn.send_command('servergroupaddclient', {'sgid': tsgrplist[g.name], 'cldbid': cldbid })
|
self.conn.send_command('servergroupaddclient', {'sgid': tsgrplist[g.name], 'cldbid': cldbid })
|
||||||
usrgrplist[g.name] = tsgrplist[g.name]
|
usrgrplist[g.name] = tsgrplist[g.name]
|
||||||
|
|
||||||
# Add to corporation groups
|
# Add to corporation groups if enabled
|
||||||
if character and character.corporation:
|
if self.settings['corporation_groups']:
|
||||||
if character.corporation.ticker in usrgrplist:
|
if character and character.corporation:
|
||||||
del usrgrplist[character.corporation.ticker]
|
if character.corporation.ticker in usrgrplist:
|
||||||
else:
|
del usrgrplist[character.corporation.ticker]
|
||||||
if not character.corporation.ticker in tsgrplist:
|
else:
|
||||||
tsgrplist[character.corporation.ticker] = self._create_group(character.corporation.ticker)
|
if not character.corporation.ticker in tsgrplist:
|
||||||
self.conn.send_command('servergroupaddclient', {'sgid': tsgrplist[character.corporation.ticker], 'cldbid': cldbid })
|
tsgrplist[character.corporation.ticker] = self._create_group(character.corporation.ticker)
|
||||||
|
self.conn.send_command('servergroupaddclient', {'sgid': tsgrplist[character.corporation.ticker], 'cldbid': cldbid })
|
||||||
|
|
||||||
# Remove OKed groups from the delete list
|
# Remove OKed groups from the delete list
|
||||||
for g in groups:
|
for g in groups:
|
||||||
|
|||||||
Reference in New Issue
Block a user