Forum


Notice to all users

We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020

Results 1 to 14 of 14
  1. #1
    Join Date
    April 2016
    Posts
    20

    View used privilege keys

    Hi,

    I'm looking to create a bot that assigns users server groups based on groups on a website, I was thinking of having a system where every user gets a privilege key assigned to them which when they connect to the server assigns them a group for example "New" the bot would then get the DBID of the user and put that in the users profile on the website.

    TL;DR is it at all possible to view what user used what privilege key through the server query?

    Thanks

  2. #2
    Join Date
    September 2012
    Posts
    6,079
    You can add information to the privilege key, which can then be found through the query interface.

    For example:
    Code:
    privilegekeyadd tokentype=0 tokenid1=7 tokenid2=0 tokencustomset=ident=user_id\svalue=CustomData\pident=user_name\svalue=CustomData2
    would create a privilege key for the normal group (on a new server anyway). Whoever uses that privilege key will also have the user_id and user_name values added to their record on the server.
    You can then do

    Code:
    customsearch ident=user_name pattern=CustomData2
    and would get the database Id of all users that used a privilege key with CustomData2 as the value.

    See also
    Code:
    help privilegekeyadd
    help customsearch
    TL;DR: Yes, if you use specially prepared privilege keys that have unique custom values assigned to them.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  3. #3
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,368
    Shouldn't that be in the log with permission logging active? You guys should make a list what log feature logs what.

    Also, there is a server query notify event for token usage, so a bot can easily monitor it.

  4. #4
    Join Date
    April 2016
    Posts
    20
    Quote Originally Posted by numma_cway View Post
    Shouldn't that be in the log with permission logging active? You guys should make a list what log feature logs what.

    Also, there is a server query notify event for token usage, so a bot can easily monitor it.
    Whats the notify event?

  5. #5
    Join Date
    June 2008
    Posts
    18,513
    It's in the server log and looks like.
    Code:
    2018-06-07 07:39:20.865697|INFO    |VirtualServer |1  |client 'dante'(id:4) used privilege key 'GwSim3akKTiHSyt3cGlWI8WP2WpvvkgjSqF4w2l1' and was added to servergroup 'Server Admin'(id:6)
    It's important that logging for Permissions was active on the virtual server when the key was used.
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  6. #6
    Join Date
    April 2016
    Posts
    20
    Quote Originally Posted by dante696 View Post
    It's in the server log and looks like.
    Code:
    2018-06-07 07:39:20.865697|INFO    |VirtualServer |1  |client 'dante'(id:4) used privilege key 'GwSim3akKTiHSyt3cGlWI8WP2WpvvkgjSqF4w2l1' and was added to servergroup 'Server Admin'(id:6)
    It's important that logging for Permissions was active on the virtual server when the key was used.
    That doesn't show the description or specific token parameters though

  7. #7
    Join Date
    April 2016
    Posts
    20
    I'm trying to use the py ts3 api but aside from the server log I cannot seem to find any way of getting the token and the details, would modifying the module to include an option for the token notify event help?

  8. #8
    Join Date
    April 2016
    Posts
    20
    I found this post https://forum.teamspeak.com/threads/...ent?highlight=on the forums where the
    Code:
    notifytokenused
    event was created, but if I do
    Code:
    help notifytokenused
    in the server query I get an invalid\sparameter error

  9. #9
    Join Date
    August 2013
    Location
    Germany
    Posts
    541
    Code:
    servernotifyregister event=tokenused

  10. #10
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,368
    Yeah, tokenused event is not really documented. A few more details can be found here (in German):
    http://yat.qa/ressourcen/server-query-notify/#tokenused

  11. #11
    Join Date
    April 2016
    Posts
    20
    I've also found the cliententerview event here http://yat.qa/ressourcen/server-quer...liententerview but when I try
    Code:
     servernotifyregister event=cliententerview
    in the server query I get a paramater not found error

  12. #12
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,368
    In the table of contents on the page, values for that "event" parameter are in the first level, while the second level is for the notifies they create. That's what it says over the table of contents.

  13. #13
    Join Date
    April 2016
    Posts
    20
    Quote Originally Posted by numma_cway View Post
    In the table of contents on the page, values for that "event" parameter are in the first level, while the second level is for the notifies they create. That's what it says over the table of contents.
    So what would the query command need to be for a cliententerview?

  14. #14
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,368
    Channel or server. Please also read the official documentation on servernotifyregister.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Privilege Keys And PHP
    By durangod in forum Permission System
    Replies: 3
    Last Post: December 18th, 2017, 07:40 PM
  2. combining privilege keys
    By ThatBoyBlue_7L in forum Server Support
    Replies: 0
    Last Post: May 5th, 2016, 08:25 AM
  3. [Not possible] Editing Privilege Keys
    By ISanic.exe in forum Permission System
    Replies: 1
    Last Post: November 2nd, 2015, 09:48 AM
  4. Privilege Keys
    By Jeroen52 in forum Permission System
    Replies: 1
    Last Post: November 5th, 2012, 02:55 PM
  5. Rescriting privilege keys
    By SSanchez10 in forum Permission System
    Replies: 1
    Last Post: November 23rd, 2011, 09:27 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
  •