Move group check after corporate, allows for corporate level groups without extra commands being executed

This commit is contained in:
2011-01-03 15:44:18 +00:00
parent b126486b69
commit d2a905e0c5

View File

@@ -160,11 +160,6 @@ class TS3Service(BaseService):
self.conn.send_command('servergroupaddclient', {'sgid': tsgrplist[g.name], 'cldbid': cldbid })
usrgrplist[g.name] = tsgrplist[g.name]
# Remove OKed groups from the delete list
for g in groups:
if g.name in usrgrplist:
del usrgrplist[g.name]
# Add to corporation groups
if character and character.corporation:
if character.corporation.name in usrgrplist:
@@ -174,6 +169,11 @@ class TS3Service(BaseService):
tsgrplist[g.name] = self._create_group(character.corporation.name)
self.conn.send_command('servergroupaddclient', {'sgid': tsgrplist[character.corporation.name], 'cldbid': cldbid })
# Remove OKed groups from the delete list
for g in groups:
if g.name in usrgrplist:
del usrgrplist[g.name]
# Remove ignored and admin groups
for k, v in usrgrplist.items():
if not int(v) == self.settings['authed_sgid'] and not int(v) in self.settings['ignore_groups']: