atlanticva Posted October 21, 2009 Report Share Posted October 21, 2009 Hi, I was wondering if anyone had an Teamspeak Integration Module for automation registration? What we would like is for a new member to join and our server would automatic register them for teamspeak and phpbb forums. Any direction would be greatly appreciated. Thanks Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted January 8, 2010 Moderators Report Share Posted January 8, 2010 yes i do its based upon the forum creation its a simple add on file. in your coremodules create another folder named in my case TSRegister (case sensitive) place this code in to that folder and when some one registeres it will create a teamspeak account with the same password and in my case Pilot is and Firstname this can be changes to what ever you like but it suites my cause. <?php class TSRegister extends CodonModule { public function __construct() { CodonEvent::addListener('TSRegister'); } public function EventListener($eventinfo) { if($eventinfo[0] == 'registration_complete') { $userinfo = $eventinfo[2]; $fname = $userinfo['firstname']; $lname = $userinfo['lastname']; $pass = $userinfo['password1']; $email = $userinfo['email']; $code = $userinfo['code']; $uinfo = PilotData::GetPilotByEmail($userinfo['email']); $code = PilotData::GetPilotCode($uinfo->code, $uinfo->pilotid); $pilot_id = $fname.$lname.$code.$pilot_id; $pilot_id_klein = strtolower($pilot_id); $passMD5 = md5($pass); $tm = time(); mysql_connect("your own server", "username", "password") or die(mysql_error()); mysql_select_db("YOUR TS DB NAME") or die(mysql_error()); // Insert a row of information into the table "ts2_clients " mysql_query("INSERT INTO ts2_clients (i_client_id, i_client_server_id, b_client_privilege_serveradmin, s_client_name, s_client_password, dt_client_created, dt_client_lastonline) VALUES('0', '1', '0', '".$code.' '.$fname."', '".$pass."', '', '' ) ") or die(mysql_error()); mysql_close(); //echo "Data Inserted!"; } } } ?> Its a bit crude but it works Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.