TeamSpeak Plugin

15 years 11 months ago #63382 by RubikStorm
TeamSpeak Plugin was created by RubikStorm
Hello All,

I would like to see a Teamspeak mysql community builder plugin that like the cb connector allows phpbb DB integration for user name and passwords except it would need to also add the user registration for teamspeak. I am working on modifying the current plug in for my needs and hope i can do it with out breaking my site :) of course I will back everything up. I am very limited in my knowledge of PHP and SQL, but I am sure soembody with more knowledge would be able to make it more efficient. It would need to auto add, delete, and modify the username and password information in the database for TS.

Thanks,
Rubik Storm

Please Log in to join the conversation.

15 years 11 months ago #63426 by RubikStorm
Replied by RubikStorm on topic Re:TeamSpeak Plugin
well we can hang up me doing the modification. I have no way of figuring it out. I do not know enough to even try and figure it out.

Please Log in to join the conversation.

15 years 11 months ago #63456 by RubikStorm
Replied by RubikStorm on topic Re:TeamSpeak Plugin
Well after looking into this issue I find that My web server does not allow connection to its database from outside locations. These means my Seperate TeamSpeak server can not authenticate off of my webs Database. :ohmy: So a teamspeak module will not work for me at this time, but I have come up with an idea that may work in my situation if somebody is willing to help me with the coding that is. I am wanting to modify the login script for community builder so that each time a user logs in to community builder it checks the TS server to see if the account exists. if it does then die with no error. If not creates the username and password in the DB of my TS server. I can handle manual removal of accounts when necessary. I just do not want my users to have to register twice and dont want to ask the user for there password either to do it for them. Confusing? I have added below the logical flow chart that may explain better as well as a php that I am currently using to allow the users register with. I am assuming part of the code from it would be used in the submit form of the login script.

Flow Chart

User logins in with username and password
|
|
Is username and pw correct for cb? - No - give error
|
|
log on to cb as normal
|
|
query TS DB for account -- exist -- die no error
|
|
does not exist
|
|
add username and password to DB

_________________________________________________

Current PHP used for TS registration


<?php
//my serverdata here:
$server = "127.0.0.1"; // this is my servers IP $queryport = 51234; // this is the TCP-queryport,
$udpport = 8767; // this is the UDPport of Teamspeakserver
$superadmin = 0; // 1 for superadminlogin, 0 for serveradmin login
$loginname = "admin";
$loginpass = "mysecretpassword";

if($fp = @fsockopen($server, $queryport, $errno, $errstr, 3)) {
$data = fread($fp,128);
#echo $data;
$ts = $data;
if(ereg("[TS]", $data)){
fputs($fp, "sel ".$udpport."\n");
$data = fread($fp,128);
#echo $data;
if(ereg("^OK", $data)){
if ($superadmin == 1) {
$login = "slogin ";
}
else {
$login= "login ";
}
fputs($fp, $login.$loginname." ".$loginpass."\n");
$data = fread($fp,128);
#echo $data;
if(ereg("^OK", $data)){
fputs($fp, "dbuseradd ".addslashes($_REQUEST)." ".addslashes($_REQUEST)." ".addslashes($_REQUEST)." 0\n");
#echo "Username: ".$_REQUEST."<br>";
#echo "Password: ".$_REQUEST."<br>";
$data = fread($fp,128);
#echo $data;
if(ereg("^OK", $data)){
fputs($fp, "rehash\n");
echo "User ".addslashes($_REQUEST)." added successfully!";
}
else {
echo "Something went wrong! Perhaps the user already exists?";
}
}
else {
echo "Login incorrect!";
}
}
else {
echo "Server with Port $udpport does not exist!";
}
}
else {
echo "This is not a TS Server or your IP got banned!";
}
fclose($fp);
}
else {
echo "Could not establish connection! Please check your settings!";
}
?>



Any help with this would be so very much appreciated. If nothing else the name of the file I will need to modify to get this to work.

Thank you,
Rubik Storm

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.235 seconds

Facebook Twitter LinkedIn