<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alliedmods.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=EKS</id>
	<title>AlliedModders Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alliedmods.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=EKS"/>
	<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/Special:Contributions/EKS"/>
	<updated>2026-05-08T22:20:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.6</generator>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=5735</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=5735"/>
		<updated>2008-04-19T23:22:39Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* What plugins use this interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty and is kindly hosted on this wiki''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:Metamod:Source Development]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.thexsoft.com/index.php?page=basic-admin-tool Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://www.thexsoft.com/index.php?page=high-ping-kicker HPK] - This plugin kicks players with a high ping.&amp;lt;br&amp;gt;&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=39511 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&amp;lt;br&amp;gt;&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=40097 CS Bot Control] - A plugin to easly manage the CS bots, with a handy menu&amp;lt;br&amp;gt;&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=40089 Sharedbans Spectator ESP (Source)] - This plugin allows admins/players who are spectating/dead and are in first person view of another player to see the enemies (and teammates) of that player through the walls. This may help to catch wallhackers &amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.siekhe-trophy.de/forum/viewtopic.php?t=669 Clanmatch-Plugin ] A plugin to making controling a clan server more easy&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://forums.alliedmods.net/showthread.php?t=39511 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
any - The &amp;quot;any&amp;quot; right may only be supported by [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots&amp;lt;br&amp;gt;&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=5734</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=5734"/>
		<updated>2008-04-19T23:21:17Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* What Admin plugins support it */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty and is kindly hosted on this wiki''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:Metamod:Source Development]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.thexsoft.com/index.php?page=basic-admin-tool Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=39511 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&amp;lt;br&amp;gt;&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=40097 CS Bot Control] - A plugin to easly manage the CS bots, with a handy menu&amp;lt;br&amp;gt;&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=40089 Sharedbans Spectator ESP (Source)] - This plugin allows admins/players who are spectating/dead and are in first person view of another player to see the enemies (and teammates) of that player through the walls. This may help to catch wallhackers &amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.siekhe-trophy.de/forum/viewtopic.php?t=669 Clanmatch-Plugin ] A plugin to making controling a clan server more easy&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://forums.alliedmods.net/showthread.php?t=39511 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
any - The &amp;quot;any&amp;quot; right may only be supported by [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots&amp;lt;br&amp;gt;&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Insurgency:_Source_Events&amp;diff=4899</id>
		<title>Insurgency: Source Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Insurgency:_Source_Events&amp;diff=4899"/>
		<updated>2007-07-08T19:13:01Z</updated>

		<summary type="html">&lt;p&gt;EKS: New page: :''Refer back to Game Events (Source) for more events.''  === game_newmap === {{qnotice|Called before the chattime when the server is about to change amp}} {{begin-hl2msg|game_newmap|s...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:''Refer back to [[Game Events (Source)]] for more events.''&lt;br /&gt;
&lt;br /&gt;
=== game_newmap ===&lt;br /&gt;
{{qnotice|Called before the chattime when the server is about to change amp}}&lt;br /&gt;
{{begin-hl2msg|game_newmap|string}}&lt;br /&gt;
{{hl2msg|string|mapname}}&lt;br /&gt;
{{end-hl2msg}}&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Game_Events_(Source)&amp;diff=4898</id>
		<title>Game Events (Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Game_Events_(Source)&amp;diff=4898"/>
		<updated>2007-07-08T16:27:51Z</updated>

		<summary type="html">&lt;p&gt;EKS: Added Insurgency&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These are all the games that the Source engine covers (that we could find).&lt;br /&gt;
* [[Generic Source Events]]&lt;br /&gt;
* [[Generic Source Server Events]]&lt;br /&gt;
* [[Counter-Strike: Source Events]]&lt;br /&gt;
* [[Day of Defeat: Source Events]]&lt;br /&gt;
* [[Half-Life 2: Deathmatch Events]]&lt;br /&gt;
* [[Half-Life 2: Capture the Flag Events]]&lt;br /&gt;
* [[Dystopia Events]]&lt;br /&gt;
* [[Pirates, Vikings, Knights II Events]]&lt;br /&gt;
* [[SourceForts Events]]&lt;br /&gt;
* [[Hidden: Source Events]]&lt;br /&gt;
* [[Perfect Dark: Source Events]]&lt;br /&gt;
* [[Iron Grip: Source  Events]]&lt;br /&gt;
* [[Insurgency: Source  Events]]&lt;br /&gt;
* [[Garry's Mod Events]]&lt;br /&gt;
&lt;br /&gt;
== Credits ==&lt;br /&gt;
[[User:Shane|Shane]] - Writing some of the events pages and organization and general wikiknowhow&amp;lt;br /&amp;gt;&lt;br /&gt;
[[User:FlyingMongoose|FlyingMongoose]] - Writing a lot of the events pages&amp;lt;br /&amp;gt;&lt;br /&gt;
[[User:sslice|sslice]] - For creating a wikitizer application for these events&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3650</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3650"/>
		<updated>2006-12-26T19:50:26Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* What Admin plugins support it */  Removed upcomming text from an&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty and is kindly hosted on this wiki''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=39511 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&amp;lt;br&amp;gt;&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=40097 CS Bot Control] - A plugin to easly manage the CS bots, with a handy menu&amp;lt;br&amp;gt;&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=40089 Sharedbans Spectator ESP (Source)] - This plugin allows admins/players who are spectating/dead and are in first person view of another player to see the enemies (and teammates) of that player through the walls. This may help to catch wallhackers &amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.siekhe-trophy.de/forum/viewtopic.php?t=669 Clanmatch-Plugin ] A plugin to making controling a clan server more easy&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://forums.alliedmods.net/showthread.php?t=39511 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
any - The &amp;quot;any&amp;quot; right may only be supported by [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots&amp;lt;br&amp;gt;&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Open_Source_Plugins_for_Metamod:Source&amp;diff=3199</id>
		<title>Open Source Plugins for Metamod:Source</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Open_Source_Plugins_for_Metamod:Source&amp;diff=3199"/>
		<updated>2006-08-03T23:26:44Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* HLStatsX ( Allows srcds to interact with hlstatsx ingame) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Open Source Plugins for SourceMM =&lt;br /&gt;
This page lists known plugins with available source code. Please check the licenses for each one as they may not truly be &amp;quot;open source.&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Basic Templates ==&lt;br /&gt;
=== stub_mm ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:BAILOPAN|BAILOPAN]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; minmum implentation of a valid SourceMM plugin&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; starting template&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; Included in the SourceMM source code package: [http://www.sourcemm.net www.sourcemm.net]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sample_mm ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:BAILOPAN|BAILOPAN]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; implements the features of the standard Valve server plugin from the SDK&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; starting template with similar functionality to the Valve sample_plugin&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; Included in the SourceMM source code package: [http://www.sourcemm.net www.sourcemm.net]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sample2_mm ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:BAILOPAN|BAILOPAN]], edited by [[User:L._Duke|L. Duke]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; fixes (by inheriting from IGameEventListener2 instead of hooking FireGameEvent) the problem in sample_mm plugin where some events are not received&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; starting template with similar functionality to the Valve sample_plugin&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download: &amp;lt;/b&amp;gt;[http://forums.alliedmods.net/showthread.php?p=342749 forums.alliedmods.net/showthread.php?p=342749] (you must be logged in to view the download link) &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Functional Plugins ==&lt;br /&gt;
=== Anti-Griefer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:devicenull|devicenull]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; This plugin is for the mod SourceForts.  In keeps track of what player unfreezes or freezes a block, and allows any other player to retrieve this information by aiming at a block.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Basic VFuncs, listening for events, partial traceline (The method used for traceline might not be effective for any other mod)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=3652 http://www.sourcemod.net/forums/viewtopic.php?t=3652]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Basic Admin Tool (BAT) ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:EKS|EKS]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; Provides basic admin functions&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Kick, ban, menus, reserved slots, timeleft/nextmap say commands, and more&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=2923 www.sourcemod.net/forums/viewtopic.php?t=2923]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Counter Strike Bot Control ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:EKS|EKS]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; This plugin allows you to control the counter strike source bots more easly, you can have them them automaticly keep the server populated. You can have bots automaticly killed when all the human players are dead, and any changes can be made in the bot menu.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Control the built in bots in CSS via a menu&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://forums.alliedmods.net/showthread.php?t=40097 http://forums.alliedmods.net/showthread.php?t=40097]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CS:S Weapon Restrictions 2 ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:L._Duke|L. Duke]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; Prevents players from picking up restricted weapons (if bought, they fall to the ground). Also includes an option to remove restricted weapons from the game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Hook &amp;lt;i&amp;gt;CCSPlayer::Weapon_CanUse(CBaseCombatWeapon *pWeapon)&amp;lt;/i&amp;gt; and returns false for restricted weapons. Also shows how to use virtual functions on weapons such as Delete()and GetName() and on players for Weapon_GetSlot(int) and Drop(CBaseCombatWeapon*).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://forums.alliedmods.net/showthread.php?p=342750 forums.alliedmods.net/showthread.php?p=342750]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== ForgiveTK ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:EKS|EKS]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; This is a basic plugin to handle teamkilll and teamattack on your source server, it supports any Source mod. It will automaticly kick someone with to many offenses &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Forgive via menu or chat. Support both Valves ESC menus and radio menus. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=3081 http://www.sourcemod.net/forums/viewtopic.php?t=3081]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Global Banlist===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:devicenull|devicenull]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; This plugin allows srcds to reguarly connect to an external PHP page, and download updates about it's banlist.  Srcds then stores these in a SQLite database. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Embedding sqlite, using pthreads, using libcurl.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=3539 http://www.sourcemod.net/forums/viewtopic.php?t=3539]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== HLStatsX ( Allows srcds to interact with hlstatsx ingame) ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:EKS|EKS]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; This plugin is made to interact with hlstatsx ( www.hlstatsx.org ) to give proper ingame stats, and provide the extra logging required for hit detection&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://forums.alliedmods.net/showthread.php?t=42502 http://forums.alliedmods.net/showthread.php?t=42502]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Last Users Connected ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:devicenull|devicenull]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; With this plugin, every player who comes onto your server has their steamid logged, along with any name they used on the server. You can then either view the names/steamid's of the last people to disconnect, or you can search for a name/steamid and see everyone who has used that name. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; shows how to embed sqlite3, send basic messages/basic hooks. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=3339 http://www.sourcemod.net/forums/viewtopic.php?t=3339]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Stripper:Source ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:BAILOPAN|BAILOPAN]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt;  You can add any type of entity - hostage, spawn point, physics prop, permanently to the map. You can also filter out entities for deletion, either by specific entries or regular expressions. Stripper:Source lets you define global rules and per-map rules. It also lets other plugins (both SourceMM plugins and Server Plugins) use its API. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; shows how to edit the map entity lump in memory to change map entities&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=3008 www.sourcemod.net/forums/viewtopic.php?t=3008]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:Documentation (SourceMM)]]&lt;br /&gt;
&lt;br /&gt;
= Open Source Valve Server Plugins (VSP) =&lt;br /&gt;
A list of open source plugins for the Valve Server Plugin (VSP) interface can be found [http://developer.valvesoftware.com/wiki/List_of_Open_Source_Server_Plugins here].&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Open_Source_Plugins_for_Metamod:Source&amp;diff=3198</id>
		<title>Open Source Plugins for Metamod:Source</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Open_Source_Plugins_for_Metamod:Source&amp;diff=3198"/>
		<updated>2006-08-03T23:26:13Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* Functional Plugins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Open Source Plugins for SourceMM =&lt;br /&gt;
This page lists known plugins with available source code. Please check the licenses for each one as they may not truly be &amp;quot;open source.&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Basic Templates ==&lt;br /&gt;
=== stub_mm ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:BAILOPAN|BAILOPAN]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; minmum implentation of a valid SourceMM plugin&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; starting template&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; Included in the SourceMM source code package: [http://www.sourcemm.net www.sourcemm.net]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sample_mm ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:BAILOPAN|BAILOPAN]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; implements the features of the standard Valve server plugin from the SDK&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; starting template with similar functionality to the Valve sample_plugin&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; Included in the SourceMM source code package: [http://www.sourcemm.net www.sourcemm.net]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== sample2_mm ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:BAILOPAN|BAILOPAN]], edited by [[User:L._Duke|L. Duke]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; fixes (by inheriting from IGameEventListener2 instead of hooking FireGameEvent) the problem in sample_mm plugin where some events are not received&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; starting template with similar functionality to the Valve sample_plugin&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download: &amp;lt;/b&amp;gt;[http://forums.alliedmods.net/showthread.php?p=342749 forums.alliedmods.net/showthread.php?p=342749] (you must be logged in to view the download link) &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Functional Plugins ==&lt;br /&gt;
=== Anti-Griefer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:devicenull|devicenull]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; This plugin is for the mod SourceForts.  In keeps track of what player unfreezes or freezes a block, and allows any other player to retrieve this information by aiming at a block.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Basic VFuncs, listening for events, partial traceline (The method used for traceline might not be effective for any other mod)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=3652 http://www.sourcemod.net/forums/viewtopic.php?t=3652]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Basic Admin Tool (BAT) ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:EKS|EKS]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; Provides basic admin functions&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Kick, ban, menus, reserved slots, timeleft/nextmap say commands, and more&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=2923 www.sourcemod.net/forums/viewtopic.php?t=2923]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Counter Strike Bot Control ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:EKS|EKS]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; This plugin allows you to control the counter strike source bots more easly, you can have them them automaticly keep the server populated. You can have bots automaticly killed when all the human players are dead, and any changes can be made in the bot menu.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Control the built in bots in CSS via a menu&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://forums.alliedmods.net/showthread.php?t=40097 http://forums.alliedmods.net/showthread.php?t=40097]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CS:S Weapon Restrictions 2 ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:L._Duke|L. Duke]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; Prevents players from picking up restricted weapons (if bought, they fall to the ground). Also includes an option to remove restricted weapons from the game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Hook &amp;lt;i&amp;gt;CCSPlayer::Weapon_CanUse(CBaseCombatWeapon *pWeapon)&amp;lt;/i&amp;gt; and returns false for restricted weapons. Also shows how to use virtual functions on weapons such as Delete()and GetName() and on players for Weapon_GetSlot(int) and Drop(CBaseCombatWeapon*).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://forums.alliedmods.net/showthread.php?p=342750 forums.alliedmods.net/showthread.php?p=342750]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== ForgiveTK ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:EKS|EKS]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; This is a basic plugin to handle teamkilll and teamattack on your source server, it supports any Source mod. It will automaticly kick someone with to many offenses &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Forgive via menu or chat. Support both Valves ESC menus and radio menus. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=3081 http://www.sourcemod.net/forums/viewtopic.php?t=3081]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Global Banlist===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:devicenull|devicenull]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; This plugin allows srcds to reguarly connect to an external PHP page, and download updates about it's banlist.  Srcds then stores these in a SQLite database. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Embedding sqlite, using pthreads, using libcurl.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=3539 http://www.sourcemod.net/forums/viewtopic.php?t=3539]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== HLStatsX ( Allows srcds to interact with hlstatsx ingame) ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:EKS|EKS]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; This plugin is made to interact with hlstatsx ( www.hlstatsx.org ) to give proper ingame stats, and provide the extra logging required for hit detection&amp;lt;/br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://forums.alliedmods.net/showthread.php?t=42502 http://forums.alliedmods.net/showthread.php?t=42502]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Last Users Connected ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:devicenull|devicenull]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; With this plugin, every player who comes onto your server has their steamid logged, along with any name they used on the server. You can then either view the names/steamid's of the last people to disconnect, or you can search for a name/steamid and see everyone who has used that name. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; shows how to embed sqlite3, send basic messages/basic hooks. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=3339 http://www.sourcemod.net/forums/viewtopic.php?t=3339]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Stripper:Source ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:BAILOPAN|BAILOPAN]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt;  You can add any type of entity - hostage, spawn point, physics prop, permanently to the map. You can also filter out entities for deletion, either by specific entries or regular expressions. Stripper:Source lets you define global rules and per-map rules. It also lets other plugins (both SourceMM plugins and Server Plugins) use its API. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; shows how to edit the map entity lump in memory to change map entities&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=3008 www.sourcemod.net/forums/viewtopic.php?t=3008]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:Documentation (SourceMM)]]&lt;br /&gt;
&lt;br /&gt;
= Open Source Valve Server Plugins (VSP) =&lt;br /&gt;
A list of open source plugins for the Valve Server Plugin (VSP) interface can be found [http://developer.valvesoftware.com/wiki/List_of_Open_Source_Server_Plugins here].&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3178</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3178"/>
		<updated>2006-07-18T19:10:38Z</updated>

		<summary type="html">&lt;p&gt;EKS: Fixed old links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty and is kindly hosted on this wiki''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=39511 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&amp;lt;br&amp;gt;&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=40097 CS Bot Control] - A plugin to easly manage the CS bots, with a handy menu&amp;lt;br&amp;gt;&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=40089 Sharedbans Spectator ESP (Source)] - This plugin allows admins/players who are spectating/dead and are in first person view of another player to see the enemies (and teammates) of that player through the walls. This may help to catch wallhackers &amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.siekhe-trophy.de/forum/viewtopic.php?t=669 Clanmatch-Plugin ] A plugin to making controling a clan server more easy&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://forums.alliedmods.net/showthread.php?t=39511 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
any - The &amp;quot;any&amp;quot; right may only be supported by [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots&amp;lt;br&amp;gt;&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://forums.alliedmods.net/showthread.php?t=39356 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3177</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3177"/>
		<updated>2006-07-18T19:08:13Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* What plugins use this interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty and is kindly hosted on this wiki''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=39511 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&amp;lt;br&amp;gt;&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=40097 CS Bot Control] - A plugin to easly manage the CS bots, with a handy menu&amp;lt;br&amp;gt;&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=40089 Sharedbans Spectator ESP (Source)] - This plugin allows admins/players who are spectating/dead and are in first person view of another player to see the enemies (and teammates) of that player through the walls. This may help to catch wallhackers &amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.siekhe-trophy.de/forum/viewtopic.php?t=669 Clanmatch-Plugin ] A plugin to making controling a clan server more easy&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
any - The &amp;quot;any&amp;quot; right may only be supported by [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots&amp;lt;br&amp;gt;&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3176</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3176"/>
		<updated>2006-07-18T18:58:54Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* What plugins use this interface */  Fixed links added 2 plugins&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty and is kindly hosted on this wiki''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=39511 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&amp;lt;br&amp;gt;&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=40097 CS Bot Control] - A plugin to easly manage the CS bots, with a handy menu&lt;br /&gt;
[http://forums.alliedmods.net/showthread.php?t=40089 Sharedbans Spectator ESP (Source)] - This plugin allows admins/players who are spectating/dead and are in first person view of another player to see the enemies (and teammates) of that player through the walls. This may help to catch wallhackers &lt;br /&gt;
[http://www.siekhe-trophy.de/forum/viewtopic.php?t=669 Clanmatch-Plugin ] A plugin to making controling a clan server more easy&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
any - The &amp;quot;any&amp;quot; right may only be supported by [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots&amp;lt;br&amp;gt;&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3093</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3093"/>
		<updated>2006-06-25T13:13:08Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* Pre defined access rights */  fixed formating&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty and is kindly hosted on this wiki''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=35047 CS Bot Control] - A plugin to easly manage the CS bots, with a handy menu&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
any - The &amp;quot;any&amp;quot; right may only be supported by [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots&amp;lt;br&amp;gt;&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3078</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3078"/>
		<updated>2006-06-10T20:26:37Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* What plugins use this interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty and is kindly hosted on this wiki''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=35047 CS Bot Control] - A plugin to easly manage the CS bots, with a handy menu&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
any - The &amp;quot;any&amp;quot; right may only be supported by [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3076</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3076"/>
		<updated>2006-06-10T20:25:53Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* What plugins use this interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty and is kindly hosted on this wiki''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?t=35047 CS Bot Control] - A plugin to easly manage the CS bots, with a handy menu&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
any - The &amp;quot;any&amp;quot; right may only be supported by [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3075</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3075"/>
		<updated>2006-06-10T20:25:38Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* What plugins use this interface */  added csbotc&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty and is kindly hosted on this wiki''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?t=35047 CS Bot Control] - A plugin to easly manage the CS bots, with a handy menu&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
any - The &amp;quot;any&amp;quot; right may only be supported by [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3070</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3070"/>
		<updated>2006-06-08T22:31:05Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* Using the interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty and is kindly hosted on this wiki''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
any - The &amp;quot;any&amp;quot; right may only be supported by [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3067</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3067"/>
		<updated>2006-06-08T13:54:53Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* Pre defined access rights */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty and is kindly hosted on this wiki''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
any - The &amp;quot;any&amp;quot; right may only be supported by [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3066</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3066"/>
		<updated>2006-06-08T13:29:12Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* Pre defined access rights */  made the explination of the any right more clear&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty and is kindly hosted on this wiki''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
any (the &amp;quot;any&amp;quot; right may only be supported by [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots)&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3065</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3065"/>
		<updated>2006-06-08T13:25:30Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* Using the interface */  Fixed a function not returning anything&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty and is kindly hosted on this wiki''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
	return true;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
any (This may only be supported by [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots)&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3055</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3055"/>
		<updated>2006-06-05T11:18:28Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* Introduction */  minor edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty and is kindly hosted on this wiki''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
any (This may only be supported by [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots)&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=Open_Source_Plugins_for_Metamod:Source&amp;diff=3054</id>
		<title>Open Source Plugins for Metamod:Source</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=Open_Source_Plugins_for_Metamod:Source&amp;diff=3054"/>
		<updated>2006-06-05T11:17:23Z</updated>

		<summary type="html">&lt;p&gt;EKS: Added ForgiveTK&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Open Source Plugins for SourceMM =&lt;br /&gt;
This page lists known plugins with available source code. Please check the licenses for each one as they may not truly be &amp;quot;open source.&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
== Basic Templates ==&lt;br /&gt;
=== stub_mm ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:BAILOPAN|BAILOPAN]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; minmum implentation of a valid SourceMM plugin&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; starting template&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; Included in the SourceMM source code package: [http://prdownloads.sourceforge.net/sourcemm/sourcemm-1.2.2-source.tar.gz?download prdownloads.sourceforge.net/sourcemm/sourcemm-1.2.2-source.tar.gz?download]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== sample_mm ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:BAILOPAN|BAILOPAN]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; implements the features of the standard Valve server plugin from the SDK&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; starting template with similar functionality to the Valve sample_plugin&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; Included in the SourceMM source code package: [http://prdownloads.sourceforge.net/sourcemm/sourcemm-1.2.2-source.tar.gz?download prdownloads.sourceforge.net/sourcemm/sourcemm-1.2.2-source.tar.gz?download]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== sample2_mm ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:BAILOPAN|BAILOPAN]], edited by [[User:L._Duke|L. Duke]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; fixes (by inheriting from IGameEventListener2 instead of hooking FireGameEvent) the problem in sample_mm plugin where some events are not received&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; starting template with similar functionality to the Valve sample_plugin&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download: &amp;lt;/b&amp;gt;[http://www.sourcemod.net/forums/viewtopic.php?p=34891 www.sourcemod.net/forums/viewtopic.php?p=34891] (you must be logged in to view the download link) &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Functional Plugins ==&lt;br /&gt;
=== Anti-Griefer ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:devicenull|devicenull]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; This plugin is for the mod SourceForts.  In keeps track of what player unfreezes or freezes a block, and allows any other player to retrieve this information by aiming at a block.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Basic VFuncs, listening for events, partial traceline (The method used for traceline might not be effective for any other mod)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=3652 http://www.sourcemod.net/forums/viewtopic.php?t=3652]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Basic Admin Tool (BAT) ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:EKS|EKS]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; Provides basic admin functions&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Kick, ban, menus, reserved slots, timeleft/nextmap say commands, and more&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=2923 www.sourcemod.net/forums/viewtopic.php?t=2923]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== CS:S Weapon Restrictions 2 ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:L._Duke|L. Duke]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; Prevents players from picking up restricted weapons (if bought, they fall to the ground). Also includes an option to remove restricted weapons from the game.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Hook &amp;lt;i&amp;gt;CCSPlayer::Weapon_CanUse(CBaseCombatWeapon *pWeapon)&amp;lt;/i&amp;gt; and returns false for restricted weapons. Also shows how to use virtual functions on weapons such as Delete()and GetName() and on players for Weapon_GetSlot(int) and Drop(CBaseCombatWeapon*).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?p=34892 www.sourcemod.net/forums/viewtopic.php?p=34892]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== ForgiveTK ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:EKS|EKS]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; This is a basic plugin to handle teamkilll and teamattack on your source server, it supports any Source mod. It will automaticly kick someone with to many offenses &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Forgive via menu or chat. Support both Valves ESC menus and radio menus. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=3081 http://www.sourcemod.net/forums/viewtopic.php?t=3081]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Global Banlist===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:devicenull|devicenull]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; This plugin allows srcds to reguarly connect to an external PHP page, and download updates about it's banlist.  Srcds then stores these in a SQLite database. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; Embedding sqlite, using pthreads, using libcurl.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=3539 http://www.sourcemod.net/forums/viewtopic.php?t=3539]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Last Users Connected ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:devicenull|devicenull]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt; With this plugin, every player who comes onto your server has their steamid logged, along with any name they used on the server. You can then either view the names/steamid's of the last people to disconnect, or you can search for a name/steamid and see everyone who has used that name. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; shows how to embed sqlite3, send basic messages/basic hooks. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=3339 http://www.sourcemod.net/forums/viewtopic.php?t=3339]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=== Stripper:Source ===&lt;br /&gt;
&amp;lt;b&amp;gt;Author:&amp;lt;/b&amp;gt; [[User:BAILOPAN|BAILOPAN]]&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt;  You can add any type of entity - hostage, spawn point, physics prop, permanently to the map. You can also filter out entities for deletion, either by specific entries or regular expressions. Stripper:Source lets you define global rules and per-map rules. It also lets other plugins (both SourceMM plugins and Server Plugins) use its API. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Features:&amp;lt;/b&amp;gt; shows how to edit the map entity lump in memory to change map entities&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Download:&amp;lt;/b&amp;gt; [http://www.sourcemod.net/forums/viewtopic.php?t=3008 www.sourcemod.net/forums/viewtopic.php?t=3008]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Category:Documentation (SourceMM)]]&lt;br /&gt;
&lt;br /&gt;
= Open Source Valve Server Plugins (VSP) =&lt;br /&gt;
A list of open source plugins for the Valve Server Plugin (VSP) interface can be found [http://developer.valvesoftware.com/wiki/List_of_Open_Source_Server_Plugins here].&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3053</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3053"/>
		<updated>2006-06-05T10:49:34Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
''Note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty''&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
any (This may only be supported by [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots)&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3052</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=3052"/>
		<updated>2006-06-05T10:46:45Z</updated>

		<summary type="html">&lt;p&gt;EKS: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
''note: AdminInterface is NOT created or maintained by the team behing Sourcemm /Amxmodx, its a interface created by a 3dparty''&lt;br /&gt;
&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
[[Category:BAT]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
any (This may only be supported by [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots)&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=2990</id>
		<title>AdminInterface (Metamod:Source)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=AdminInterface_(Metamod:Source)&amp;diff=2990"/>
		<updated>2006-06-03T23:39:43Z</updated>

		<summary type="html">&lt;p&gt;EKS: First edition of AdminInterface&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:{{owned_project}}&lt;br /&gt;
=Introduction=&lt;br /&gt;
AdminInterface is a interface that allows sourcemm plugins to interact with admin plugins like [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] / [http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)] to get the current admin rights of the players. It also allows the plugins to register custom access rights for their plugin.&lt;br /&gt;
This interface was made so smaller plugins, that may need admin rights for something simple dont need to make a system where the admin have to setup user rights for ever plugin. But instead can setup admin right in the admin plugin he preferes and the other plugins can get the information they need for it.&lt;br /&gt;
&lt;br /&gt;
[[Category:Half-Life 2]]&lt;br /&gt;
[[Category:SourceMM]]&lt;br /&gt;
&lt;br /&gt;
=What Admin plugins support it=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.mani-admin-plugin.com Mani (Support comming in a upcomming version)]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''If you have a admin plugin that supports has support for the AdminInterface edit this page.''&lt;br /&gt;
&lt;br /&gt;
=What plugins use this interface=&lt;br /&gt;
[http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] - This plugin adds a simple TK system to any source server, so players can forgive teamkills &amp;amp; teamattacks.&lt;br /&gt;
&lt;br /&gt;
''If you have a plugin that uses the interface, feel free to add it here.''&lt;br /&gt;
&lt;br /&gt;
=How do I use the AdminInterface in my plugin=&lt;br /&gt;
The following example is taken directly out of the [http://www.sourcemod.net/forums/viewtopic.php?t=3081 ForgiveTK] plugin, and this plugin offcourse is based of the sourcemm sample plugins. The soucemm sample plugins have this AllPluginsLoaded() function, this is a good time to check to see if you can find the AdminInterface, incase your plugin is loaded before the admin plugin.&lt;br /&gt;
&lt;br /&gt;
==Getting started==&lt;br /&gt;
Before you start coding, you should get the AdminInterface.h file, you can get this file easy from [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source ( in hl2sdk/batinterface.h ).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
AdminInterface *m_AdminManager;&lt;br /&gt;
&lt;br /&gt;
void ForgiveTK::AllPluginsLoaded()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager) // We dont need to find the AdminInterface again, we allready found it once.&lt;br /&gt;
		return;&lt;br /&gt;
&lt;br /&gt;
	//we don't really need this for anything other than interplugin communication&lt;br /&gt;
	//and that's not used in this plugin.&lt;br /&gt;
	//If we really wanted, we could override the factories so other plugins can request&lt;br /&gt;
	// interfaces we make.  In this callback, the plugin could be assured that either&lt;br /&gt;
	// the interfaces it requires were either loaded in another plugin or not.&lt;br /&gt;
	PluginId id2; &lt;br /&gt;
&lt;br /&gt;
	void *ptr = g_SMAPI-&amp;gt;MetaFactory(&amp;quot;AdminInterface&amp;quot;, NULL, &amp;amp;id2); &lt;br /&gt;
	&lt;br /&gt;
	if (!ptr) &lt;br /&gt;
	{&lt;br /&gt;
		ServerCommand(&amp;quot;echo Did not find AdminInterface, plugin will not check admin rights&amp;quot;); &lt;br /&gt;
	} else {&lt;br /&gt;
		m_AdminManager = (AdminInterface *)ptr;&lt;br /&gt;
		m_AdminManager-&amp;gt;AddEventListner(this);&lt;br /&gt;
		int InterfaceVersion = m_AdminManager-&amp;gt;GetInterfaceVersion();&lt;br /&gt;
		&lt;br /&gt;
		if(InterfaceVersion == ADMININTERFACE_VERSION)&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), via %s (Interface version: %d)&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion); &lt;br /&gt;
		else&lt;br /&gt;
			ServerCommand(&amp;quot;echo Found AdminInterface[%d] at (%p), but interface was NOT the expected version: Was %d Expected %d, this can create problems. Please update the plugin with the lowest interface version&amp;quot;, id2, ptr,m_AdminManager-&amp;gt;GetModName(),InterfaceVersion,ADMININTERFACE_VERSION); &lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::Client_Authorized(int id) // This is called when a client is fully connected and authed by the admin tool, this normaly happens after the client has gotten a valid steamid &amp;amp; the admin tool has checked it against its internal user lists.&lt;br /&gt;
{&lt;br /&gt;
	ServerCommand(&amp;quot;echo Client_Authorized: %d&amp;quot;,id);&lt;br /&gt;
}&lt;br /&gt;
void ForgiveTK::OnAdminInterfaceUnload() // Called when the admin interface is getting unloaded, this happens if a admin uses meta unload or the server is shutting down.&lt;br /&gt;
{&lt;br /&gt;
	m_AdminManager = NULL;&lt;br /&gt;
	ServerCommand(&amp;quot;echo AdminInterface was unloaded&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Its importent that you setup a callback to your plugin, when use the interface so the admin plugin can inform you plugin when its being unloaded.&lt;br /&gt;
&lt;br /&gt;
==Using the interface==&lt;br /&gt;
The following function bellow would check if a user has a admin right equal to &amp;quot;immunity&amp;quot; and return true if thats the case.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bool ForgiveTK::HasAdminImmunity(int id) // Checks if the user has a admin right &amp;quot;immunity&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	return m_AdminManager-&amp;gt;HasFlag(id,&amp;quot;immunity&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Here we register a new access right, that we can check again later. If we dont want to use one of the predefined access rights.&lt;br /&gt;
bool ForgiveTK::RegisterNewAcccessFlag()&lt;br /&gt;
{&lt;br /&gt;
	if(m_AdminManager == NULL)&lt;br /&gt;
		return false;&lt;br /&gt;
&lt;br /&gt;
	m_AdminManager-&amp;gt;RegisterFlag(&amp;quot;FakeAccess Class&amp;quot;,&amp;quot;FakeAccessRight&amp;quot;,&amp;quot;This is a fake access right&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pre defined access rights==&lt;br /&gt;
These are the rights the admin tools allready support. And you can check for in your plugin:&lt;br /&gt;
any (This may only be supported by [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool], it basicly checks if the user has any of the rights bellow not including reservedslots)&lt;br /&gt;
Notice that all access rights are in lower case, and they are strings. The reason they are strings is becuse most admin tools are going to handle admin rights internaly diffrently, so this is the only way to export it properbly.&lt;br /&gt;
&lt;br /&gt;
kick - The access to kick a another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slap - The access to slap another player.&amp;lt;br&amp;gt;&lt;br /&gt;
slay - The access to slay another player.&amp;lt;br&amp;gt;&lt;br /&gt;
ban - The access to ban another player.&amp;lt;br&amp;gt;&lt;br /&gt;
chat - The access to use admin chat and or admin say commads.&amp;lt;br&amp;gt;&lt;br /&gt;
rcon - the access to execute commands the server console.&amp;lt;br&amp;gt;&lt;br /&gt;
map - The access to change maps.&amp;lt;br&amp;gt;&lt;br /&gt;
reservedslots - The access to reservedslots.&amp;lt;br&amp;gt;&lt;br /&gt;
immunity - Immunity from certain actions from other players, like kick.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=How do I add the AdminInterface in my plugin=&lt;br /&gt;
This is only for those that have a admin plugin, and want their plugin to support the interface&lt;br /&gt;
Download the [http://www.sourcemod.net/forums/viewtopic.php?p=34909 Basic Admin Tool] source code, and look at BATInterface .cpp / .h and add it to your plugin. Remember you cannot change AdminInterface / AdminInterfaceListner class in the header file as the interface must be the same in all the admin plugins.&lt;/div&gt;</summary>
		<author><name>EKS</name></author>
		
	</entry>
</feed>