<?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_onPlayerTrySendChat</id>
		<title>DCS hook onPlayerTrySendChat - 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_onPlayerTrySendChat"/>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=DCS_hook_onPlayerTrySendChat&amp;action=history"/>
		<updated>2026-04-24T07:30:48Z</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_onPlayerTrySendChat&amp;diff=12898&amp;oldid=prev</id>
		<title>Grimes: Created page with &quot;{{Template:DCS_hooks_callbacks  |fName= onPlayerTrySendChat  |vNum= 2.5.0  |par1= hook  |par2=   |par3=   |par4=  |desc= Occurs when a player attempts to...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.hoggitworld.com/index.php?title=DCS_hook_onPlayerTrySendChat&amp;diff=12898&amp;oldid=prev"/>
				<updated>2021-05-15T00:39:30Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Template:DCS_hooks_callbacks  |fName= onPlayerTrySendChat  |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 attempts to...&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= onPlayerTrySendChat&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 attempts to send a chat message. This function can be used to suppress or modify the message from appearing. For example chat commands can be created for admins by checking who sent the message and doing an action based on that. &lt;br /&gt;
&lt;br /&gt;
playerId is who sent the message&lt;br /&gt;
&lt;br /&gt;
message is a string of what they typed.&lt;br /&gt;
&lt;br /&gt;
all is a boolean if the message is to all. &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: string&lt;br /&gt;
   Filtered message&lt;br /&gt;
   &amp;quot;&amp;quot; An empty string. If empty the message will not be sent. &lt;br /&gt;
&lt;br /&gt;
|reqType1= number&lt;br /&gt;
&lt;br /&gt;
|reqName1= playerId&lt;br /&gt;
&lt;br /&gt;
|reqType2= string&lt;br /&gt;
&lt;br /&gt;
|reqName2= message&lt;br /&gt;
&lt;br /&gt;
|reqType3= boolean&lt;br /&gt;
&lt;br /&gt;
|reqName3= all&lt;br /&gt;
&lt;br /&gt;
|reqType4= &lt;br /&gt;
&lt;br /&gt;
|reqName4= &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= Replaces any occurrence of the word &amp;quot;hockey&amp;quot; with &amp;quot;Go Avs Go&amp;quot; in a chat message. Additionally if someone tries to say &amp;quot;Detroit Red Wings&amp;quot; then the message will be suppressed. &lt;br /&gt;
   &lt;br /&gt;
   function myCall.onPlayerTrySendChat(id, msg, all)&lt;br /&gt;
       if string.gsub(msg, &amp;quot;hockey&amp;quot;) then&lt;br /&gt;
           return &amp;quot;Go Avs Go&amp;quot;&lt;br /&gt;
       elseif string.find(&amp;quot;Detroit Red Wings&amp;quot;) then&lt;br /&gt;
           return &amp;quot;&amp;quot;&lt;br /&gt;
       end&lt;br /&gt;
   end&lt;br /&gt;
|notes= &lt;br /&gt;
}}&lt;br /&gt;
[[Category:DCS Hooks|onPlayerTrySendChat]]&lt;/div&gt;</summary>
		<author><name>Grimes</name></author>	</entry>

	</feed>