Teamspeak3 Server Integration

Started by ŦώεαЖзяŁ, January 18, 2010, 09:18:41 AM

Previous topic - Next topic

ŦώεαЖзяŁ

I'm trying to work on a way to integrate SMF and Teamspeak3, and I think I found a way to do it, however I don't know enough PHP to do it myself, so here's what needs to be done, if anyone wants to give it a shot... feel free to give me credit for the idea if you want to, but don't feel obliged, I don't really care about credits...

As you know if you have tried setting up a TS3 server, it no longer uses username/login like TS2, instead it uses a token system... I'm not gonna go into the merits or demerits of the system, but overall it makes integration a much bigger pain in the ass...

Looking at both my SMF Database and the TS3 database, I saw that passing the SMF user info into the TS3 database might not be impossible, so that a SMF user's password can be converted into a TS3 token, so that a member of the forum can use their SMF password as a token to easily register into the TS3 server.

The process:
To do this, someone needs to create a PHP script that does the following:

Populates the Tokens table in the TS3 database with new rows with the following information:

server_id field: need input from the person running it

token_key field: should grab the info from each row from passwd field in the smf_members table from SMF. It's important that the value be unhashed(not sure if this is the right term) because TS3 does not use a hash system, so that the password has to be the same thing in the TS3 database as the user typed when they registered.

token_type field: can be left 0 as far as i know

token_id1 field: needs to grab the id_group from smf_members and convert into the appropriate TS3 member group, I guess the best way to do this is to have an input for the person running the script. It can probably list all the SMF groups and let the person pick which group number to convert them to for TS3, like in SMF 1 is admin, in TS3 it's 7... and if nothing is specified, they get converted into 8 which is guest.

token_id2 field: can be left 0 as far as i know.

Of course, the script will need a place for putting the TS3 mysql database info, that is, host, database name and password.

And it would be nice if the script can save which entries have already been converted so that if it's run again, it only adds new entries.

I'm guessing this could easily be turned into a full mod for SMF and be setup to run every X minutes/hours... which would be great.

Link Sharing Community - Share links and earn cash in the process!
APPS | GAMES | MUSIC | MOVIES | TV SHOWS | E-BOOKS

Norv

Quote from: ŦώεαЖзяŁ on January 18, 2010, 09:18:41 AM
token_key field: should grab the info from each row from passwd field in the smf_members table from SMF. It's important that the value be unhashed(not sure if this is the right term) because TS3 does not use a hash system, so that the password has to be the same thing in the TS3 database as the user typed when they registered.
That's not possible. SMF hashes the password and only the hashed value is saved. You can't retrieve the non-hashed password, from the value in the SMF database.
The only way to have the same password in SMF and another software (like TS3) is to register the user in the same time, I mean, to store the password as TS3 wants, in the same as SMF registers the user and stores its hashed password.

Quote from: ŦώεαЖзяŁ on January 18, 2010, 09:18:41 AM
token_id1 field: needs to grab the id_group from smf_members and convert into the appropriate TS3 member group, I guess the best way to do this is to have an input for the person running the script. It can probably list all the SMF groups and let the person pick which group number to convert them to for TS3, like in SMF 1 is admin, in TS3 it's 7... and if nothing is specified, they get converted into 8 which is guest.
It makes sense, to have membergroups somewhat equivalent.
I'd note that in SMF, guest is id = 0.

Quote from: ŦώεαЖзяŁ on January 18, 2010, 09:18:41 AM
And it would be nice if the script can save which entries have already been converted so that if it's run again, it only adds new entries.

I'm guessing this could easily be turned into a full mod for SMF and be setup to run every X minutes/hours... which would be great.

I'm not sure about that. A proper integration doesn't need to convert and re-convert again. What it does, is to modify the registration of new users so that when they register, they are added to both databases. So no need to re-convert. :)

A question: so are you saying that the "token" is the password? Then how is this system different from a username - password authentification?

Thank you very much for the analysis, I'm sure it will be useful.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Largo_npc

#2
I've been thinking about doing something like this.

What I'd like to do is, when a user applys for Membership into our Community (This is after registration, and I've created my own Approve/Decline Admin panel for Community Applications), a login for the TS3 server would be created and the details sent to the user in a PM.

I can't see why this wouldn't work, and although I know very basic PHP and MySQL, I can't figure out how to integrate TS3 SDK.

This looks useful: http://forum.teamspeak.com/showthread.php?t=46905

I think I might be able to do what I want to do with this.

bobbart

TS3 does not use username/password, you need to use the uniqueID.
I had created a .NET application that managed all my registrations.   A user would browse to the app site and register.
It would create there SMF, TS2 and Openfire accounts using the basic username and password process.  The TS3 took extra information to create, they had to supply there TS3 UniqueID.  This would then add them to the registered Server Group which would be set to allow login without a server password.  ( this keeps you from getting alot of unregistered users filling your DB and prevents hacking to some degree.)
If they ever had to reinstall TS3 and did not save there Profile, they would get a new UniqueID.  All they needed to do was login to the app account and update there UniqueID and vala they were back in.  If you did not allow them to update there UniqueID you would have a mess on your hands.

I would love to see this done as a SMF Mod. 
I would just add it to the SMF User Profile.  Let them register on SMF then login to there Profile and register for TS3 using there UniqueID.  Allowing them to update there UniqueID as well.

The TS3 Registration needs to be created backend via the serverquery as well as any server groups you want to add them to.
The UniqueID you can just hammer an UPDATE into the dB

I hope someone does PHP coding and will tackle this soon.

CFCParadox

characters remaining: 575

bobbart

As I said I have already created a .NET site that does this, so it is possible.  To make it a mod must be possible.  You would need to use telnet commands to work with TS3 in the way that I do and I can not see why a PHP programmer could not figure this out.


Rene88

sitl want this to work. no one make it posible?

Advertisement: