<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JonKAS</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JonKAS"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/JonKAS"/>
	<updated>2026-05-15T09:21:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetBans&amp;diff=43910</id>
		<title>GetBans</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetBans&amp;diff=43910"/>
		<updated>2015-01-06T01:00:52Z</updated>

		<summary type="html">&lt;p&gt;JonKAS: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function will return a table over all the [[ban]] values in the server.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table getBans ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[table]] of all the [[ban]]s.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example 1: Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example lists every ban when somebody types &amp;quot;/bans&amp;quot;. WARNING: This will spam chat (for the player that executed the command) if the server has a lot of bans.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function listBans ( playerSource )&lt;br /&gt;
local banList = getBans() -- Return a table of all the bans.&lt;br /&gt;
	--&lt;br /&gt;
	for banID, ban in ipairs ( banList ) do -- For every ban do the following...	&lt;br /&gt;
		--&lt;br /&gt;
		local nick = getBanNick ( ban ) -- Get the IP of the ban&lt;br /&gt;
		--&lt;br /&gt;
		if nick then&lt;br /&gt;
			outputChatBox ( &amp;quot;Ban #&amp;quot; .. banID .. &amp;quot;: &amp;quot; .. nick, playerSource , 255, 0, 0, true ) -- Output the ban.&lt;br /&gt;
		end&lt;br /&gt;
		--&lt;br /&gt;
	end&lt;br /&gt;
	--&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;bans&amp;quot;, listBans ) -- Add &amp;quot;/bans&amp;quot; as the trigger for the function.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Admin functions}}&lt;br /&gt;
[[ru:getBans]]&lt;/div&gt;</summary>
		<author><name>JonKAS</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetBans&amp;diff=43909</id>
		<title>GetBans</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetBans&amp;diff=43909"/>
		<updated>2015-01-06T01:00:10Z</updated>

		<summary type="html">&lt;p&gt;JonKAS: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function will return a table over all the [[ban]] values in the server.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table getBans ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[table]] of all the [[ban]]s.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example 1: Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example lists every ban when somebody types &amp;quot;/bans&amp;quot;. WARNING: This will spam chat (for the player that executed the command) if the server has a lot of bans.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function listBans ( playerSource )&lt;br /&gt;
local banList = getBans() -- Return a table of all the bans.&lt;br /&gt;
	--&lt;br /&gt;
	for banID, ban in ipairs ( banList ) do -- For every ban do the following...	&lt;br /&gt;
		--&lt;br /&gt;
		local nick = getBanNick ( ban ) -- Get the IP of the ban&lt;br /&gt;
		--&lt;br /&gt;
		if nick then&lt;br /&gt;
			outputChatBox ( &amp;quot;Ban #&amp;quot; .. banID .. &amp;quot;: &amp;quot; .. nick, playerSource , 255, 0, 0, true ) -- Output the ban.&lt;br /&gt;
		end&lt;br /&gt;
		--&lt;br /&gt;
	end&lt;br /&gt;
	--&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;bans&amp;quot;, listBans ) -- Add &amp;quot;/bans&amp;quot; as the trigger for the function.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Admin functions}}&lt;br /&gt;
[[ru:getBans]]&lt;/div&gt;</summary>
		<author><name>JonKAS</name></author>
	</entry>
</feed>