Forum

Results 1 to 10 of 10
  1. #1
    Join Date
    February 2017
    Posts
    45

    How to order the channellist like on the server

    It's me again

    I want to order the channellist like on the server and how my client displays it.

    So i found the CHANNEL_ORDER variable
    https://git.rwth-aachen.de/carstenf/...oller.cpp#L242

    and so i sort my channels: https://git.rwth-aachen.de/carstenf/...oller.cpp#L257

    But for some reason the toplvl channels are still in crazy order. The subchannels seam to work. Pretty sure there is a simple reason.

  2. #2
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    The order variable points to the predecessor's channel id. The first channel has an order of 0.

    An example (syntax is <Name>(<ID>): <Sortorder>):
    Code:
    Default Channel (3): 0
    Second Channel (356): 3
    --Subchannel (1): 0
    --Sec Sub (39213): 1
    Another Channel (2): 356
    To make it even more complicated, the returned array of getChannelList is ordered by id, so in the example you'll get [1, 2, 3, 356, 39213].

  3. #3
    Join Date
    February 2017
    Posts
    45
    Who has thought up this?

    he needs to be stupid what about such an order:
    Default Channel (3): 0
    Second Channel (356): 1
    --Subchannel (1): 0
    --Sec Sub (39213): 1
    Another Channel (2): 2

    would be much better

  4. #4
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    Welcome to TeamSpeak 3 (Funfact: The ordering of TeamSpeak 2 channels worked the way you descibred above).

    But both ways have pros and cons. Imho the current behaviour is much more efficient with hashing. If a new channel is created, you can easily sort it in. Only the initial loading of the tree is such a pain.

    Btw.: I built a full working model (with kind of Qt) some days ago. Most of the sorting is done in _appendChannel resp. rowOf. Maybe it helps.

  5. #5
    Join Date
    February 2017
    Posts
    45
    ok i got it now https://git.rwth-aachen.de/carstenf/...oller.cpp#L262

    Just one thing. I create that list the first time on connection https://git.rwth-aachen.de/carstenf/...lugin.cpp#L365
    and i do it after STATUS_CONNECTION_ESTABLISHED, so all clients and channels should be known. But for some reason the clients are not displayed except my self. When i jump somewhere the other clients are shown, too. Any ideas??

  6. #6
    Join Date
    September 2012
    Posts
    6,079
    you can only get the clients of channels you're subscribed to.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  7. #7
    Join Date
    June 2011
    Location
    Germany
    Posts
    4,365
    TeamSpeak 2 had no subsubchannels, so the order IDs wouldn't work as you described I guess.

  8. #8
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    Quote Originally Posted by numma_cway View Post
    TeamSpeak 2 had no subsubchannels, so the order IDs wouldn't work as you described I guess.
    Who said anything about subsubchannels? TeamSpeak 2 had channels and subchannels ordered by their order property (or by channel names excluding chars [^A-Za-z0-9] for same order property).
    [/offtopic]

  9. #9
    Join Date
    February 2017
    Posts
    45
    @Chris but i'm subscribed to all channels. When i move somewhere else ALL clients are displayed of any channel. But not when i connect

  10. #10
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    On STATUS_CONNECTION_ESTABLISHED you are only subscribed to your own channel. After that, the client will recover your subscriptions (or subscribe to all channels if possible, if it's your first visit).

    So in your onConnectStatusChangeEvent, the client doesn't know the other clients. But they are introduced with onClientMoveSubscriptionEvent.

    You could also use onChannelSubscribeFinishedEvent which is fired after connectStatusChangeEvent, after all initial subscriptions are assigned.

    But if you really wanna display the tree in realtime, I'd recommend using QTreeView instead and create a Model for that. Imho it's alot easier to implement with the sdk.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [Resolved] Client_Query Plugin ==>> channellist
    By Palingenesis in forum General Questions
    Replies: 5
    Last Post: August 2nd, 2016, 10:48 AM
  2. Replies: 2
    Last Post: December 30th, 2015, 02:11 PM
  3. Server groups order
    By Enirevlow in forum General Questions
    Replies: 1
    Last Post: August 11th, 2013, 08:50 PM
  4. Server Join order
    By Surviverx in forum Permission System
    Replies: 8
    Last Post: August 28th, 2012, 10:33 AM
  5. Error in the help text of the query command channellist
    By Stefan1200 in forum General Questions
    Replies: 1
    Last Post: February 9th, 2010, 08:20 PM

Posting Permissions

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