plugins/include/basecomm.inc
author Nicholas Hastings <skamonkey@gmail.com>
Wed Jul 06 22:34:21 2011 -0400 (2011-07-06)
changeset 3340 7eb2b72e42d8
child 3645 80c9ae186971
permissions -rw-r--r--
Added native interface for Basecomm plugin (bug 2594, r=fyren).
     1 /**
     2  * vim: set ts=4 :
     3  * =============================================================================
     4  * SourceMod (C)2004-2011 AlliedModders LLC.  All rights reserved.
     5  * =============================================================================
     6  *
     7  * This file is part of the SourceMod/SourcePawn SDK.
     8  *
     9  * This program is free software; you can redistribute it and/or modify it under
    10  * the terms of the GNU General Public License, version 3.0, as published by the
    11  * Free Software Foundation.
    12  * 
    13  * This program is distributed in the hope that it will be useful, but WITHOUT
    14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    15  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
    16  * details.
    17  *
    18  * You should have received a copy of the GNU General Public License along with
    19  * this program.  If not, see <http://www.gnu.org/licenses/>.
    20  *
    21  * As a special exception, AlliedModders LLC gives you permission to link the
    22  * code of this program (as well as its derivative works) to "Half-Life 2," the
    23  * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
    24  * by the Valve Corporation.  You must obey the GNU General Public License in
    25  * all respects for all other code used.  Additionally, AlliedModders LLC grants
    26  * this exception to all derivative works.  AlliedModders LLC defines further
    27  * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
    28  * or <http://www.sourcemod.net/license.php>.
    29  *
    30  * Version: $Id$
    31  */
    32  
    33 #if defined _basecomm_included
    34  #endinput
    35 #endif
    36 #define _basecomm_included
    37 
    38 /**
    39  * Returns whether or not a client is gagged
    40  *
    41  * @param client		Client index.
    42  * @return				True if client is gagged, false otherwise.
    43  */
    44 native bool:BaseComm_IsClientGagged(client);
    45 
    46 /**
    47  * Returns whether or not a client is muted
    48  *
    49  * @param client		Client index.
    50  * @return				True if client is muted, false otherwise.
    51  */
    52 native bool:BaseComm_IsClientMuted(client);
    53 
    54 /**
    55  * Sets a client's gag state
    56  *
    57  * @param client		Client index.
    58  * @param gagState		True to gag client, false to ungag.
    59  * @return				True if this caused a change in gag state, false otherwise.
    60  */
    61 native bool:BaseComm_SetClientGag(client, bool:gagState);
    62 
    63 /**
    64  * Sets a client's mute state
    65  *
    66  * @param client		Client index.
    67  * @param muteState		True to mute client, false to unmute.
    68  * @return				True if this caused a change in mute state, false otherwise.
    69  */
    70 native bool:BaseComm_SetClientMute(client, bool:muteState);
    71 
    72 /* DO NOT EDIT BELOW THIS LINE */
    73 
    74 public SharedPlugin:__pl_basecomm = 
    75 {
    76 	name = "basecomm",
    77 	file = "basecomm.smx",
    78 #if defined REQUIRE_PLUGIN
    79 	required = 1,
    80 #else
    81 	required = 0,
    82 #endif
    83 };
    84 
    85 #if !defined REQUIRE_PLUGIN
    86 public __pl_basecomm_SetNTVOptional()
    87 {
    88 	MarkNativeAsOptional("BaseComm_IsClientGagged");
    89 	MarkNativeAsOptional("BaseComm_IsClientMuted");
    90 	MarkNativeAsOptional("BaseComm_SetClientGag");
    91 	MarkNativeAsOptional("BaseComm_SetClientMute");
    92 }
    93 #endif