Community Forums Today's Posts     Member List     Archive    
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2005
    Location
    Middelburg (The Netherlands)
    Posts
    12

    What is the internal sort order used by teamspeak?

    At this moment I'm writing a new teamspeak query script as the existing ones (or at least the ones I know about) don't fill my requirements. This new query script is almost finished but I have a question I think only teamspeak insiders can answer.

    I want my query script to show channels and players in exactly the same order as the windows teamspeak client does. However... the windows teamspeak client sorts the channels and players using a string comparison algorithm that isn't the same as php's string comparison algorithm (http://nl2.php.net/strcmp). I already found out teamspeak sorts it's channels first by sort-order value and then 'alphabetically', and it sorts players first by server-admin status and then 'alphabetically'.

    My questions are:
    - What part of the playername is compared when performing an alphabetical search? Is it just "John Doe" or is it "John Doe (R SA)"?
    - What part of the channelname is compared when performing an alphabetical search? Is it just "Default" or is it "Default (RD)"?
    - What is the comparison method the teamspeak client uses when comparing two strings? Sourcecode would be the best type of answer, but if not possible i'd like to have a detailed description of this so I can implement the same sort order in the teamspeak query script. Details about leaving some characters out of the comparions, case-sensitivity and comparing strings with unequal lengths for example are important.

    I hope someone can answer my questions. Thanks in advance.

    Oh btw: the script will be released under an open source license so everyone can use, distribute and modify it for free (under terms of the GNU GPL license).

  2. #2
    Join Date
    Mar 2005
    Location
    Middelburg (The Netherlands)
    Posts
    12
    As nobody has put some effort in providing me an answer, I started trying to find the sort order method myself. I guessed it should look like this:

    - Players are first sorted by SA-status (Server administrators first) and then by displayname (including it's rights)
    - Channels are first sorted by channel-order number and then by displayname (including it's statusflags)

    When teamspeak is about to determine the order of 2 displaynames, it first rips all characters out of it that are non-alphanumeric. The stripped-down displaynames are then case-insensitively compared to determine the order.

    I hope I'm right as this will be the method I'll implement in the next version of the Teamspeak Display I released recently. If not, please tell me.

  3. #3
    m&m's Guest
    also case sentive ! AaBb then channels are set by the number in the "edit channel" sort order box and servers with the same sort order will be sorted in abc order from there as well

    if you looking for a PHP nuke block that already does all this look in my sig

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. sort order - block it!
    By Najki in forum [TeamSpeak 2] Server Support
    Replies: 1
    Last Post: 13-05-2004, 10:52
  2. Sort Order
    By Vlad in forum [TeamSpeak 2] Server Support
    Replies: 3
    Last Post: 08-04-2003, 16:34

Posting Permissions

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