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 9 of 9
  1. #1
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376

    Differences in PluginTargetMode

    If you send Plugincommands, you can define a targetmode, which is defined as follows:
    Code:
    enum PluginTargetMode {
    	PluginCommandTarget_CURRENT_CHANNEL=0,                  //send plugincmd to all clients in current channel
    	PluginCommandTarget_SERVER,                             //send plugincmd to all clients on server
    	PluginCommandTarget_CLIENT,                             //send plugincmd to all given client ids
    	PluginCommandTarget_CURRENT_CHANNEL_SUBSCRIBED_CLIENTS, //send plugincmd to all subscribed clients in current channel
    	PluginCommandTarget_MAX
    };
    What is "PluginCommandTarget_CURRENT_CHANNEL_SUBSCRIBED_CL IENTS" for or what is the difference to PluginCommandTarget_CURRENT_CHANNEL?
    The comment states "all subscribed clients in current channel", but there can't be clients in my channel I am not subscribed to (like invisible clients). What am I missing?

  2. #2
    Join Date
    May 2016
    Location
    Idar-Oberstein
    Posts
    163
    The explanation is... not ideal.
    It's supposed to mean "all clients that are subscribed to the current channel".

  3. #3
    Join Date
    September 2012
    Posts
    6,079
    It's as the enum value explains: "All clients subscribed to your channel"
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  4. #4
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    So "the magic" happens only on the serverside? On the client side, you don't know, to which clients the command is delivered to?

    EDIT: And furthermore, you can send plugincommands to clients which are not in the own client's view?

  5. #5
    Join Date
    May 2016
    Location
    Idar-Oberstein
    Posts
    163
    ? 1) Correct
    ? 2) Correct
    ? EDIT) Unsure without looking it up, but would assume so.

  6. #6
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    OK, thanks for the clarification.

  7. #7
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    If someone else stumbles on this: PluginCommandTarget_SERVER does not add "server magic", the plugincommand is only delivered to all clients on the server which are in the own client's view.

  8. #8
    Join Date
    September 2012
    Posts
    6,079
    Quote Originally Posted by Thomas View Post
    If someone else stumbles on this: PluginCommandTarget_SERVER does not add "server magic", the plugincommand is only delivered to all clients on the server which are in the own client's view.
    Cannot confirm that. PluginCommandTarget_SERVER will send to all clients, whether or not you have their current channel subscribed.

    Tested with two clients connected to their own channels on public. Sending in one client and both clients receive the message despite only being subscribed to their own channels all by themselves (as subscribing isn't possible on public).

    My guess is that you don't have the plugin enabled on the client you tested against. You'll only receive plugin commands when you're running the plugin the command is for.
    When sending PMs please make sure to include a reference link to the thread in question in the body of your message.

  9. #9
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    OK, you are right.

    Nevertheless I'd suggest, you annotate the enum a little bit more. It's very uncommon in the ts3 world that you can interact with clients which are not in view.

    P.S:
    Quote Originally Posted by Chris View Post
    My guess is that you don't have the plugin enabled on the client you tested against. You'll only receive plugin commands when you're running the plugin the command is for.
    Nope, seems I didn't notice, that I tested this with my already bypassed code, where I do something like this:
    sendPluginCommand(schid, cmdtosend, PluginCommandTarget_SERVER) = sendPluginCommand(schid, cmdtosend, PluginCommandTarget_CLIENT, getClientList(schid))

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Differences in version
    By m_schu in forum General Questions
    Replies: 1
    Last Post: March 21st, 2017, 10:28 PM
  2. Style differences
    By hyprdmg in forum Skins / Icon & Sound Packs
    Replies: 0
    Last Post: September 3rd, 2011, 03:23 AM
  3. Differences between Value and Grants
    By B3n-G4le in forum Permission System
    Replies: 2
    Last Post: December 23rd, 2009, 06:22 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
  •