Forum

Results 1 to 5 of 5

Thread: Auto Ban Help

  1. #1
    Join Date
    October 2005
    Location
    scotland
    Posts
    20

    Auto Ban Help

    Hi folks,

    I need a little help with banning users from TS3 who have not registered a unique id with my database.

    Basically I want to only allow access to the TS3 server if someone has registered their unique id with my website, a form sends all the users info to the TS3 mysql database that I have setup and that all works. If the user does not register their unique key with the database they are automatically put on the ban list till they register their key.

    I have it all working just fine but the ban only works if the ban_uid is known. How can I can stop access to TS3 using either their auto generated client_id or ip instead of the ban_uid?

    Hope this makes sense.


    I have also noticed that if I delete the ban from the database I still cannot connect. I have to delete the ban from within TS3 itself. Where else are bans being registered? I would of thought that all this was controlled from what is stored in the database.


    EDIT***

    I have noticed that if I manually delete the ban from the database the user cannot connect, if I restart the server they can connect. Seems like the ban is held in some sort of cache as it still appears in the ban list option within the client even though it's not in the database, clicked refresh and still doesn't work. Restarting the server solved it but still not any closer to what I'm trying to do.
    Last edited by rossco; February 11th, 2010 at 11:24 PM.

  2. #2
    Join Date
    December 2009
    Location
    Germany
    Posts
    66
    You should use a completely different approach here. For example, you could generate a token when people register on your page, so they can add themselves to an allowed server group (guests are not allowed to do anything). That way they are not restricted to entering the long unique id (that might not even be accessible at the registration), but can easily identify with the server.

    Also regarding your edit: A lot database entries are read to RAM when the server starts, and changes to the database don't affect the server while it is running. The refresh button in your client just checks for changes on the server, but does not tell the server to reload the data from the database.

  3. #3
    Join Date
    October 2005
    Location
    scotland
    Posts
    20
    Thanks for the reply... sounds like a better idea and one that will work!

  4. #4
    Join Date
    October 2005
    Location
    scotland
    Posts
    20
    I'm back and I need some help with the following if possible.

    I am wondering if I can modify the token_delete_by_key sql file so that it not only deletes a token when it's been registered but also take a value from the tokens table and insert it into the clients table?

    I have allowed a user to generate a token and it registers their userID from a CMS that I use in to a new field that I added in the token table. I want to pass this ID to the client_id in the clients table so the userID on the site matches that of the TS client_id.

    I don't understand the syntax for the sql files.

    The code in the token_delete_by_key sql is

    Code:
    delete from tokens where server_id=:server_id: and token_key=:token_key:
    How can I add something to this to take value userid from the tokens table and insert it in to the clients table under client_id?

  5. #5
    Join Date
    October 2005
    Location
    scotland
    Posts
    20
    I don't suppose anyone has any pointers for me do they? I hope someone can help out.

    Thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Auto-leveling / auto-dimming other sound while someone is talking
    By MatthewTyson in forum General Questions
    Replies: 1
    Last Post: October 22nd, 2012, 08:53 AM
  2. Newbie help, Auto move to AFK and AUTo Kick!
    By Peniku in forum General Questions
    Replies: 3
    Last Post: October 20th, 2010, 10:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •