PDA

View Full Version : An idea for gameserver plugin - comments?


[PWG] Tackdriver
12-04-2007, 15:36
Hello,

I've been thinking of an idea to create a server plugin for CS:S that allows the gameserver to essentially interface users to a teamspeak server.

The idea sort of comes from looking at some of the Eventscripts scripts that exist out there which are really cool, but maybe a few more features would be really neat.

First off I guess I'd like to make sure this isn't already being done by somebody else... why write a plugin if it's already been done. :)

But these are a few features I think would be really cool to have in a server plugin, if it's at all possible:

1. Ability to connect a player to your password-protected teamspeak server without having to give them the password. (this is already done with joinvoice and sab_teamspeak eventscripts)

2. Auto-switching of the player to the correct sub-channel when they switch teams or go spec -- which is already done in the 2 eventscripts I've looked at, but preferably without having to stuff another client "browse" command that makes another blank in-game browse dialog come up that has to be OK'd to continue playing the game. Looking over the tsremote.dll it almost looks like this could be done from the server plugin possibly.

3. Automatic disconnection of players from the Teamspeak server when they disconnect from the gameserver, so they don't tie up a teamspeak server slot. This isn't being done yet by either eventscript I've looked at, but if tsremote.dll/.so functions could be used by the server plugin it does sort of look like this could maybe be done. Assuming the server plugin could talk to the teamspeak server (which could either be local or remote).

4. Abillity to keep some type of database (flat file, mysql, whatever) of Teamspeak users for various things. For example, track them by SteamID or something, so that some users on the server could maybe have some admin rights on the TS server via the plugin. Or for that matter, maybe you want to have a ban list of SteamID's or IP's -- people that you are willing to let play on the gameserver, but are not allowed to connect to the TS server from the game because they spam the mic too much or can't control their temper, whatever... OK this is probably pretty fancy, especially considering my lack of C++ skills.. but it would be pretty cool


Just some ideas... I know there are web-based management tools etc. but if you're trying to PLAY the game occasionally (not just sitting in front of a web interface and HLSW all day), it would be really cool to be able to have various functionality like this right in the gameserver as a plugin with a menu and some chat commands etc.

Would the tsremote client library (.so/.dll) be able to handle the functions to talk to the TS server for the things described above? (well, the parts that involve sending commands to the TS server). I could probably just have the plugin link the library if I'm not totally missing the purpose. I guess I'd need C/C++ equivalent header files for the functions.

Thanks for any advice/comments.

[PWG] Tackdriver

[PWG] Tackdriver
13-04-2007, 15:08
OK let's see if I can boil this down to just the essential questions...

Can I use tsremote.dll/tsremote.so as a function library in a gameserver plugin to send management commands to the TeamSpeak server? Or can this only be used with the teamspeak client app (on client systems)?

If I can't use these libraries in a gameserver plugin, can anyone recommend function libraries that I *CAN* use for the types of functions I described in the first post? The idea is for the gameserver to manage the connections, switching players between channels, and disconnecting them from the TS server when they leave the server, etc. - all via the server plugin, so that it is not necessary for admins to run another interface to manage the TS server used with the gameserver.

Thanks,
[PWG] Tackdriver

KilledAlot
13-04-2007, 22:42
Almost anything you summarize can be done with the telnet interface of the TeamSpeak server. Connect to the query port of TS (51234) with any telnet app, type ? and you will get a list of every command you can use. From a plugin you can use simple tcp socket communication to query and command TS.

[PWG] Tackdriver
14-04-2007, 03:37
Ah, so probably not nearly as complicated as I thought it might be.

Neat. Thanks for the reply!

/me rolls up sleeves

[PWG] Tackdriver

[PWG] Tackdriver
14-04-2007, 13:34
GRRR... my teamspeak server provider has me pretty severely restricted on what commands I can do. Will have to shoot them an email.

In meantime I can slap up a Teamspeak server here on the local network for devel work

Tack

Reedy Boy
14-04-2007, 14:55
Tackdriver;156726']In meantime I can slap up a Teamspeak server here on the local network for devel work

Tack


Sounds like a plan!

[PWG] Tackdriver
15-04-2007, 19:12
Sigh... well as it turns out, you have to have superadmin on the teamspeak server to be able to use the tcpquery commands I'd need to do what I have in mind. That probably means we'll have to get a different teamspeak server provider unless I can convince them to give me superadmin. I suspect they won't since that allows us to change the number of slots on our server instance.

Anyway, using teamspeak server here on local network for testing etc.

[PWG] Tackdriver

KilledAlot
15-04-2007, 20:01
Tackdriver;156896']Sigh... well as it turns out, you have to have superadmin on the teamspeak server to be able to use the tcpquery commands I'd need to do what I have in mind. That probably means we'll have to get a different teamspeak server provider unless I can convince them to give me superadmin. I suspect they won't since that allows us to change the number of slots on our server instance.

Anyway, using teamspeak server here on local network for testing etc.

[PWG] Tackdriver

You will not get the superadmin account from you provider :mad: That would give you full control on any TeamSpeak instance they are running. For TSvCoD to do the work, Admin rights on the server your hiring is sufficient.

I made a mistake in my earlier reply, you have to type help instead of ?. This will give you a full list of commands you can use. Most of the commands will work with Admin rights. When connected you have to select the server by issueing the command sel nnnn, nnnn is the port number you use to connect to your instance (i.e. 8767). then you can login with login username password. From then u can use all commands for that server.