Results 1 to 1 of 1
14-07-2010, 10:11 #1-= TeamSpeak Team =-
- Join Date
- Jul 2002
How to integrate large existing user bases into TeamSpeak 3How to integrate large existing user bases (e.g. from a forum/website/MMO) into the TS3 authentication system.
This post is for you if you have large community that are already authenticated (e.g. by user+password) on your game, forum or website and you would like allow these members access to a TeamSpeak 3 server.
In this post we talk a lot about forum members, which might as well in your scenario be community members of something entirely different than a forum, just substitute "forum" with whatever platform your community is built on.
Use cases are:
Only members: You want to create a TeamSpeak 3 server but want only forum members to be able to join (and a server password won't work for you because your community is too large to keep secrets or because you want to be able to revoke join privileges without hassle).
Special privileges: You wish to assign custom server or channel groups to your members depending on their forum rank or post count etc.
Harnessing the powers of TeamSpeak 3 allows you to create a very user friendly and simple interface to get your users onto TeamSpeak 3, but there will be some coding work to be done on the forum (developer side) to make this possible. Let's look at the two perspectives, user and developer:
Forum users view:
After logging in you will see a link "Join our TeamSpeak 3 server" which will take you to a separate page telling you to download and install the TeamSpeak 3 client (if not already present) and then to "Click this link to connect". When you click the link your TeamSpeak 3 client will start (if not already started) and then connect to the community TeamSpeak 3 server. Optionally a dialogue will ask if you wish to bookmark this server within the TS3 Client so you don't have to go through the forums "Click this link to connect" link in the future, but can just use TS3 directly to connect. If you are banned/deleted from the Forums your TeamSpeak 3 privileges will also be revoked.
Forum developers view:
For each forum user (either on demand or up front, depending on what works best in your scenario) you will create a so called privilege key (previously called "token", and still called token in the serverquery interface) which is a string that authenticates a user. Use the tokenadd serverquery command to create them, the commands might look like this:
tokenadd tokentype=0 tokenid1=7 tokenid2=0 tokendescription=automatically\screated\stoken\sfor\s$USER tokencustomset=ident=forum_user\svalue=$USER\pident=forum_id\svalue=$USER_ID
Once you have the token you then need to build the ts3server:// link that lies behind the "Click here to connect". It should look something like this:
<a href="ts3server://voice.teamspeak.com?nickname=$USER&addbookmark=TS-Forum-Server&token=eKnFZQ9EK7G7MhtuQB6+N2B1PNZZ6OZL3ycDp2OW/">Click here to connect</a>
Now all you need to do is make sure privileges on TS3 are revoked/adjusted when they are changed on the forum. Say all you need is to delete TS3 accounts when you delete forum accounts. Find the code that is run when deleting a forum user, and add code that uses the serverquery interface to interface with the TS3 server, the commands could be something like this (lines beginning with ">" are sent by you, everything else is response by the server):
> customsearch ident=forum_account pattern=$USER cldbid=123 ident=forum_account value=$USER error id=0 msg=ok > clientdbdelete cldbid=123 error id=0 msg=ok
Last edited by dante696; 23-09-2011 at 15:32.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By mancert in forum Linux / FreeBSDReplies: 159Last Post: 24-09-2011, 16:51
By AndresCL in forum Linux / FreeBSDReplies: 28Last Post: 03-01-2010, 14:15
By frasor in forum [TeamSpeak 2] General QuestionsReplies: 14Last Post: 26-03-2006, 20:46
By narv in forum [TeamSpeak 2] General QuestionsReplies: 1Last Post: 21-06-2003, 03:56
By ctrlz in forum [TeamSpeak 2] Server SupportReplies: 4Last Post: 19-04-2003, 23:39