14 lines
5.6 KiB
HTML
14 lines
5.6 KiB
HTML
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Muting clients locally</title><link rel="stylesheet" href="ts3doc.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="TeamSpeak 3 Client SDK Developer Manual"><link rel="up" href="index.html" title="TeamSpeak 3 Client SDK Developer Manual"><link rel="prev" href="ar01s23s07.html" title="Channel subscriptions"><link rel="next" href="ar01s25.html" title="Custom encryption"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><img id="logo" src="images/logo.png"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Muting clients locally</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s23s07.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ar01s25.html"><img src="images/next.png" alt="Next"></a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="muteclients"></a>Muting clients locally</h2></div></div></div><p>Individual clients can be locally muted. This information is handled client-side only and not visibile to other clients. It mainly serves as a sort of individual "ban" or "ignore" feature, where users can decide not to listen to certain clients anymore.</p><p>When a client becomes muted, he will no longer be heard by the muter. Also the TeamSpeak 3 server will stop sending voice packets.</p><p>The mute state is not visible to the muted client nor to other clients. It is only available to the muting client by checking the <em class="structfield"><code>CLIENT_IS_MUTED</code></em> client property.</p><p>To mute one or more clients:
|
||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_requestMuteClients</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">clientIDArray</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const anyID* <var class="pdparam">clientIDArray</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
|
||
<a class="indexterm" name="idm44835433176080"></a></p><p>To unmute one or more clients:
|
||
</p><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">ts3client_requestUnmuteClients</b>(</code></td><td><var class="pdparam">serverConnectionHandlerID</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">clientIDArray</var>, </td><td> </td></tr><tr><td> </td><td><var class="pdparam">returnCode</var><code>)</code>;</td><td> </td></tr></table><div class="paramdef-list"><code>uint64 <var class="pdparam">serverConnectionHandlerID</var></code>;<br><code>const anyID* <var class="pdparam">clientIDArray</var></code>;<br><code>const char* <var class="pdparam">returnCode</var></code>;</div><div class="funcprototype-spacer"> </div></div><p>
|
||
<a class="indexterm" name="idm44835433171312"></a></p><div class="itemizedlist"><ul type="disc"><li><p><em class="parameter"><code>serverConnectionHandlerID</code></em></p><p>ID of the server connection handle on which the client should be locally (un)muted</p></li><li><p><em class="parameter"><code>clientIDArray</code></em></p><p>NULL-terminated array of client IDs.</p></li><li><p><em class="parameter"><code>returnCode</code></em></p><p>See <a class="link" href="ar01s04.html#callingReturnCode" title="Return code">return code documentation</a>. Pass NULL if you do not need this feature.</p></li></ul></div><p>Returns <em class="structfield"><code>ERROR_ok</code></em> on success, otherwise an error code as defined in <code class="filename">public_errors.h</code>.</p><p>Example to mute two clients:</p><pre class="programlisting">anyID clientIDArray[3]; // List of two clients plus terminating zero
|
||
clientIDArray[0] = 123; // First client ID to mute
|
||
clientIDArray[1] = 456; // Second client ID to mute
|
||
clientIDArray[2] = 0; // Terminating zero
|
||
|
||
if(ts3client_requestMuteClients(scHandlerID, clientIDArray) != ERROR_ok) /* Mute clients */
|
||
printf("Error muting clients: %d\n", error);</pre><p>To check if a client is currently muted, query the <em class="structfield"><code>CLIENT_IS_MUTED</code></em> client property:</p><pre class="programlisting">int clientIsMuted;
|
||
if(ts3client_getClientVariableAsInt(scHandlerID, clientID, CLIENT_IS_MUTED, &clientIsMuted) != ERROR_ok)
|
||
printf("Error querying client muted state\n);</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s23s07.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ar01s25.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">Channel subscriptions </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> Custom encryption</td></tr></table></div></body></html>
|