[ABD] Teamspeak login integration v:0.3.1

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Draygo
Registered User
Posts: 24
Joined: Fri Apr 03, 2009 4:49 pm

[ABD] Teamspeak login integration v:0.3.1

Post by Draygo »

Modification Name: Teamspeak login integration
Author: Draygo

Modification Description: Integrates teamspeak login with phpbb's database and manages access through the ACP.
Modification Version: Version: 0.3.1
Install Difficulty:Hard

Requirements:
  • Php 5 or greater
  • mysql 5 or greater
  • Teamspeak 2 configured to use a mysql database.
  • Linux users see note below.
Features:
  • Instantly integrates teamspeaks authentication with phpbb's forum authentication.
  • Allows forum users to log onto the teamspeak server using their forum username and password
  • Allows board founders to control SA rights of users on individual teamspeak servers
  • Supports multiple servers
  • Access controlled through a special group permissions page.
Screenshots: ACP module

Modification Download: TSLI 0.3.1 (zip)
*Note that the majority of the install is DIY, follow instructions carefully.

History:
  • 0.3.1
    • updated read_client_login.sql
  • 0.3.0
    • First release
To do: create an install script/package (UMIL). Test.

Note: currently having trouble with getting stored functions to work with the teamspeak drivers in linux. Any help with this would be appreciated. It should be possible to get this working.
Last edited by Draygo on Fri Apr 10, 2009 1:00 am, edited 11 times in total.
armatec
Registered User
Posts: 50
Joined: Sat Mar 14, 2009 7:44 pm

Re: [DEV] Teamspeak login integration v:0.3.0

Post by armatec »

if ya wont me to test it let me know
Draygo
Registered User
Posts: 24
Joined: Fri Apr 03, 2009 4:49 pm

Re: [DEV] Teamspeak login integration v:0.3.0

Post by Draygo »

Yes, just keep an eye on the topic. Hopefully I'll have a build ready by monday.
armatec
Registered User
Posts: 50
Joined: Sat Mar 14, 2009 7:44 pm

Re: [DEV] Teamspeak login integration v:0.3.0

Post by armatec »

i got an this baby watched mate i have been working on a module at sits at the bottom or the index page
armatec
Registered User
Posts: 50
Joined: Sat Mar 14, 2009 7:44 pm

Re: [DEV] Teamspeak login integration v:0.3.0

Post by armatec »

could you also add a step by step to setting up ts to use mysql please as i cant seam to get it running
User avatar
pascal24
Registered User
Posts: 60
Joined: Mon Apr 06, 2009 7:12 am
Location: Netherlands
Contact:

Re: [DEV] Teamspeak login integration v:0.3.0

Post by pascal24 »

Nice can't wait to test it :)
-Pascal

Support will not be given via PM, MSN or e-mail
Goztow
Registered User
Posts: 365
Joined: Fri Aug 17, 2007 10:31 am
Location: Belgium
Contact:

Re: [DEV] Teamspeak login integration v:0.3.0

Post by Goztow »

I'll be waiting for this one.
Draygo
Registered User
Posts: 24
Joined: Fri Apr 03, 2009 4:49 pm

Re: [ALPHA] Teamspeak login integration v:0.3.0

Post by Draygo »

Last step I have to do is make the install package, its a bit complicated, and I havent done this before. So in the interest in getting it out there i'm going to update the op in a minute with manual install instructions while I work on the modx and umil files, this way you guys can start testing it and suggest changes.

We will go into beta as soon as I have built the install package.

Update: manual install package is now in the original post. It contains instructions on how to setup mysql 5 and teamspeak, modify the forum database to include a few functions teamspeak needs to verify user credentials, and add a new table. Modify one .sql file to change how teamspeak checks the login credentials. Modify one php file (constants.php) and add 4 new ones (the new module).
Draygo
Registered User
Posts: 24
Joined: Fri Apr 03, 2009 4:49 pm

Re: [BETA] Teamspeak login integration v:0.3.0

Post by Draygo »

Ok, updated the download to include a MODx file. The majority of the install is DIY, so post here with any questions or problems you run across. If you are having trouble getting teamspeak working with mysql you might want to seek support on teamspeak's website.
rudlls
Registered User
Posts: 8
Joined: Wed Apr 08, 2009 3:25 am

Re: [BETA] Teamspeak login integration v:0.3.0

Post by rudlls »

o/ Draygo.
as per our discussion on teamspeak forums. Got my vps up and running, installed a fresh version of phpbb
setup TS to run on mysql of the phpbbdatabase
Copied the files to their folders in phpbb folder.
went to acp/acp/add module but no teamspeak was listed there :( (I am a phpbb modding noob so am I missing something?)

edit:
was able to manhandle it by making it use the acp_jabber settings. it now correctly displays groups and allows adding removing group access to ts...



I went ahead and added the groups manually to the ts2_group_perm
on the new server I get no errors from the teamspeak servers, but I get no login either :(

help?
Draygo
Registered User
Posts: 24
Joined: Fri Apr 03, 2009 4:49 pm

Re: [BETA] Teamspeak login integration v:0.3.1

Post by Draygo »

Lets work on the first problem, you are saying when you put the files in you do not see this:
ACP module management
make sure you are putting the acp_teamspeak.php info file in the correct folder.
If you see the teamspeak module in the dropdown its correctly installed. But you still have to add the module. (go up to the user and groups catagory and click the add a module button, make a category named teamspeak, then go into that new category, add a module then add in the teamspeak module like that screenshot. )

Looks like i put up the wrong read_client_login.sql i'm updating the zip now and putting in the correct one.

it should be

Code: Select all

select user_id as i_client_id, 
if(phpbb_checksa(user_id, 0),0,:iServerID) as i_client_server_id, 
username as s_client_name,
phpbb_checksa(user_id, :iServerID) as b_client_privilege_serveradmin,
user_password as s_client_password,
user_regdate as dt_client_created,
user_regdate as dt_client_lastonline
from phpbb_users
where
username = :sName and phpbb_password(:sPassword, user_password) = user_password and phpbb_checkaccess(user_id, :iServerID);
replace the 'phpbb_users' table with the correct prefix.

Test it by opening a command/ssl/ssh line connection to your mysql database.
Run the following:

Code: Select all

select user_id as i_client_id, 
if(phpbb_checksa(user_id, 0),0,1) as i_client_server_id, 
username as s_client_name,
phpbb_checksa(user_id, 1) as b_client_privilege_serveradmin,
user_password as s_client_password,
user_regdate as dt_client_created,
user_regdate as dt_client_lastonline
from phpbb_users
where
username = :sName and phpbb_password(:sPassword, user_password) = user_password and phpbb_checkaccess(user_id, 1);
replace :sName with your username, :sPassword with your password. phpbb_users with the correct user table.
rudlls
Registered User
Posts: 8
Joined: Wed Apr 08, 2009 3:25 am

Re: [BETA] Teamspeak login integration v:0.3.1

Post by rudlls »

ok the shell query returns my user with the hashed password:

Code: Select all

 53 | rudlls   | $H$9Kiul0oSrViu4aT55gdYXP9c9v2yVm1
this is the code for the read_client_login:

Code: Select all

Select user_id as i_client_id,
if(phpbb_checksa(user_id, 0),0,1) as i_client_server_id,
username as s_client_name,
phpbb_checksa(user_id, 1) as b_client_privilege_serveradmin,
user_password as s_client_password,
user_regdate as dt_client_created,
user_regdate as dt_client_lastonline
from phpbb_users
where
username = 'rudlls' and phpbb_password('mypass', user_password) = user_password and phpbb_checkaccess(user_id, 1);
if ran against mysql directly it returns

Code: Select all

i_client_id 	i_client_server_id 	s_client_name 	b_client_privilege_serveradmin 	s_client_password 	dt_client_created 	dt_client_lastonline
53 	1 	rudlls 	1 	$H$9Kiul0oSrViu4aT55gdYXP9c9v2yVm1 	1239142342 	1239142342
TS config:

Code: Select all

[Main Config]
BoundToIp1=
ExternalIPDectection=1
HTTPServer Port=45500
HTTPServer Enabled=1
DateTimeFormat=dd-mm-yyyy hh:nn:ss
TCPQueryPort=51234
AllowedClientNameChars=
DisAllowedClientNameChars={}

[debug]
MessageTypes=LMTALL
MessageDepths=LMDALL

[WebPost]
AdminEmail=na
ISPLinkURL=na
ISPName=Private
ISPCountryNumber=0
Enabled=1
PostURL=
ListPublic=1
UserAgent=teamspeak

[log]
access_r=1
access_u=1
channel_registerred=0
channel_unregisterred=0
sa=0
chat=0
kick_server=0
kick_channel=0

[Spam]
max_commands=10
in_seconds=2

[DBEXPRESS]
sqldir=mysql_sql/
Drivername=mysql
Database=phpbb3
Hostname=127.0.0.1
User_name=someuser
Password=somepass
GetDriverFunc=getSQLDriverMYSQL
VendorLib=./libmysqlclient_r.so.10.0.0
LibraryName=./libsqlmy.so
Active=1


at this point TS server is not producing any errors (the db not supported went away)
if I replace the read_client with stock file it connects fine to ts using mysql as backend.

yesterday night I have done some extensive testing and it seems that if the read_client_login.sql contains any of the stored functions, the result is incorrect login/pass error on ts client display.

I have tested each of the functions separately they all behave the same.

Unfortunately the vps doesnt allow me to enable query log so I dont have dumps of what ts asks. trying to figure out a work around of how to do that.

TS info:

Code: Select all

08-04-09 14:43:16,ALL,Info,server,      Server init initialized
08-04-09 14:43:16,ALL,Info,server,      Server version: 2.0.24.1 Linux
08-04-09 14:43:17,ALL,Info,server,      Starting VirtualServer id:1 with port:8767
08-04-09 14:43:17,ALL,Info,server,      Started VirtualServer id:1 with port:8767
08-04-09 14:43:17,ALL,Info,server,      Server init finished
08-04-09 14:43:17,WARNING,Info,server,  TeamSpeak Server daemon activated
Mysql info
Server version: 5.0.67-community-log
rudlls
Registered User
Posts: 8
Joined: Wed Apr 08, 2009 3:25 am

Re: [BETA] Teamspeak login integration v:0.3.1

Post by rudlls »

update:
I tricked the system (breaking the query by adding non mysql command at the end of it so that TS logs it :D)

Code: Select all

select user_id as i_client_id,
if(phpbb_checksa(user_id, 0),0,1) as i_client_server_id,
username as s_client_name,
phpbb_checksa(user_id, 1) as b_client_privilege_serveradmin,
user_password as s_client_password,
user_regdate as dt_client_created,
user_regdate as dt_client_lastonline
from phpbb_users
where
username = 'rudlls' and phpbb_password('mypass', user_password) = user_password and phpbb_checkaccess(user_id, 1);
and again if the query is ran against mysql directly it returns corrent line:

Code: Select all

i_client_id 	i_client_server_id 	s_client_name 	b_client_privilege_serveradmin 	s_client_password 	dt_client_created 	dt_client_lastonline
53 	1 	rudlls 	1 	$H$9Kiul0oSrViu4aT55gdYXP9c9v2yVm1 	1239142342 	1239142342
I am sure its like a checkbox somewhere I am missing :/
Draygo
Registered User
Posts: 24
Joined: Fri Apr 03, 2009 4:49 pm

Re: [BETA] Teamspeak login integration v:0.3.1

Post by Draygo »

hrm try ./libmysqlclient_r.so.15.0.0 instead and see what happens. Unfortunatly I'm running this under a windows enviroment right now so its possible that the linux library isnt properly supporting custom functions (remember these were introduced in mysql 5, and did not exist before). I'm looking at a possible work around using ODBC in linux to link teamspeak to mysql.
rudlls
Registered User
Posts: 8
Joined: Wed Apr 08, 2009 3:25 am

Re: [BETA] Teamspeak login integration v:0.3.1

Post by rudlls »

Draygo wrote:hrm try ./libmysqlclient_r.so.15.0.0 instead and see what happens. Unfortunatly I'm running this under a windows enviroment right now so its possible that the linux library isnt properly supporting custom functions (remember these were introduced in mysql 5, and did not exist before). I'm looking at a possible work around using ODBC in linux to link teamspeak to mysql.
unfortunately you will find the linux version only talks to mysql using version 10.0.0. anything else produces error on load (could not load database)
Locked

Return to “[3.0.x] Abandoned MODs”