Added Teamspeak3 support

This commit is contained in:
Raynaldo Rivera
2014-11-23 02:17:38 -07:00
parent 22ad5feced
commit b806ab6755
14 changed files with 837 additions and 177 deletions

View File

@@ -65,6 +65,14 @@ class AuthServicesInfoManager:
authserviceinfo.ipboard_password = password
authserviceinfo.save(update_fields=['ipboard_username', 'ipboard_password'])
@staticmethod
def update_user_teamspeak3_info(uid, perm_key, user):
if User.objects.filter(username=user.username).exists():
authserviceinfo = AuthServicesInfoManager.__get_or_create(user)
authserviceinfo.teamspeak3_uid = uid
authserviceinfo.teamspeak3_perm_key = perm_key
authserviceinfo.save(update_fields=['teamspeak3_uid', 'teamspeak3_perm_key'])
@staticmethod
def update_is_blue(is_blue, user):
if User.objects.filter(username=user.username).exists():

View File

@@ -11,6 +11,8 @@ class AuthServicesInfo(models.Model):
jabber_password = models.CharField(max_length=254, default="")
mumble_username = models.CharField(max_length=254, default="")
mumble_password = models.CharField(max_length=254, default="")
teamspeak3_uid = models.CharField(max_length=254, default="")
teamspeak3_perm_key = models.CharField(max_length=254, default="")
main_char_id = models.CharField(max_length=64, default="")
is_blue = models.BooleanField(default=False)
user = models.ForeignKey(User)