<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.hoggitworld.com/index.php?action=history&amp;feed=atom&amp;title=DCS_hook_onPlayerTryConnect</id>
		<title>DCS hook onPlayerTryConnect - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.hoggitworld.com/index.php?action=history&amp;feed=atom&amp;title=DCS_hook_onPlayerTryConnect"/>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=DCS_hook_onPlayerTryConnect&amp;action=history"/>
		<updated>2026-04-24T11:31:49Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.hoggitworld.com/index.php?title=DCS_hook_onPlayerTryConnect&amp;diff=12897&amp;oldid=prev</id>
		<title>Grimes: Created page with &quot;{{Template:DCS_hooks_callbacks  |fName= onPlayerTryConnect  |vNum= 2.5.0  |par1= hook  |par2=   |par3=   |par4=  |desc= Occurs when a player initially att...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=DCS_hook_onPlayerTryConnect&amp;diff=12897&amp;oldid=prev"/>
				<updated>2021-05-15T00:30:23Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Template:DCS_hooks_callbacks  |fName= onPlayerTryConnect  |vNum= 2.5.0  |par1= &lt;a href=&quot;/index.php?title=DCS_server_hooks&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;DCS server hooks (page does not exist)&quot;&gt;hook&lt;/a&gt;  |par2=   |par3=   |par4=  |desc= Occurs when a player initially att...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Template:DCS_hooks_callbacks&lt;br /&gt;
&lt;br /&gt;
|fName= onPlayerTryConnect&lt;br /&gt;
&lt;br /&gt;
|vNum= 2.5.0&lt;br /&gt;
&lt;br /&gt;
|par1= [[DCS_server_hooks|hook]]&lt;br /&gt;
&lt;br /&gt;
|par2= &lt;br /&gt;
&lt;br /&gt;
|par3= &lt;br /&gt;
&lt;br /&gt;
|par4=&lt;br /&gt;
&lt;br /&gt;
|desc= Occurs when a player initially attempts to connect to the server. Can be used to force allow or deny access. Passed values are the users ip address, unique DCS identifier, their name, and the id that the player would have if they connected. Can be used to ban players from entering your server due to inappropriate name or past actions committed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''IMPORTANT: ''' If any value is returned with this function then any other callback that uses it will be ignored. If no choice is to be made, then do NOT return any value. &lt;br /&gt;
&lt;br /&gt;
|rtnType= nothing&lt;br /&gt;
&lt;br /&gt;
|rtnExample= Value 1: boolean&lt;br /&gt;
   Return true will force allow the player into the server&lt;br /&gt;
   Return false rejects the player from entering the server&lt;br /&gt;
&lt;br /&gt;
Value 2: String&lt;br /&gt;
   Message for why the player is not allowed into the server. &lt;br /&gt;
&lt;br /&gt;
|reqType1= string&lt;br /&gt;
&lt;br /&gt;
|reqName1= addr&lt;br /&gt;
&lt;br /&gt;
|reqType2= string&lt;br /&gt;
&lt;br /&gt;
|reqName2= ucid&lt;br /&gt;
&lt;br /&gt;
|reqType3= string&lt;br /&gt;
&lt;br /&gt;
|reqName3= name&lt;br /&gt;
&lt;br /&gt;
|reqType4= number&lt;br /&gt;
&lt;br /&gt;
|reqName4= playerId&lt;br /&gt;
&lt;br /&gt;
|reqType5= &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|optType1= &lt;br /&gt;
&lt;br /&gt;
|optName1= &lt;br /&gt;
&lt;br /&gt;
|optType2=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|related= &lt;br /&gt;
List of Callbacks: {{listOfDCSHooks}}&lt;br /&gt;
&lt;br /&gt;
|examples= Checks the ucid of a user attempting to connect to see if that ucid is present in that table. If it is then it returns false thus preventing them from joining the server and displaying a message that they have been banned. &lt;br /&gt;
   &lt;br /&gt;
   function myCall.onPlayerTryConnect(addr, name, ucid, id)&lt;br /&gt;
       if someBannedList[ucid] then&lt;br /&gt;
           return false, &amp;quot;Dude you have been banned&amp;quot;)&lt;br /&gt;
       end&lt;br /&gt;
   end&lt;br /&gt;
|notes= &lt;br /&gt;
}}&lt;br /&gt;
[[Category:DCS Hooks|onPlayerTryConnect]]&lt;/div&gt;</summary>
		<author><name>Grimes</name></author>	</entry>

	</feed>