<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/Modules/bIRC/ircGetUserMode?action=history&amp;feed=atom</id>
	<title>Modules/bIRC/ircGetUserMode - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/Modules/bIRC/ircGetUserMode?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/bIRC/ircGetUserMode&amp;action=history"/>
	<updated>2026-09-29T21:40:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Modules/bIRC/ircGetUserMode&amp;diff=21080&amp;oldid=prev</id>
		<title>Awwu: Created page with &#039;{{ml_birc}} __NOTOC__ This function returns the user mode of user in specified channel. The specified {{ml_birc|ircbot}} has to be in that channel.  ==Syntax==  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; str…&#039;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Modules/bIRC/ircGetUserMode&amp;diff=21080&amp;oldid=prev"/>
		<updated>2009-08-14T20:54:55Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;{{ml_birc}} __NOTOC__ This function returns the user mode of user in specified channel. The specified {{ml_birc|ircbot}} has to be in that channel.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; str…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{ml_birc}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function returns the user mode of user in specified channel. The specified {{ml_birc|ircbot}} has to be in that channel.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string ircGetUserMode ( ircbot theBot, string channel, string user )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;theBot:&amp;#039;&amp;#039;&amp;#039; The ircbot which is in the channel&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;channel:&amp;#039;&amp;#039;&amp;#039; The name of the channel which channel mode you want to get&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;user:&amp;#039;&amp;#039;&amp;#039; The name of the user whose user mode you want to return&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[string]] containing a series of symbols, each representing a user mode. Symbols are&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;+:&amp;#039;&amp;#039;&amp;#039; user is voiced in the channel&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;%:&amp;#039;&amp;#039;&amp;#039; user is a channel half-operator&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;@:&amp;#039;&amp;#039;&amp;#039; user is a channel operator&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;&amp;amp;:&amp;#039;&amp;#039;&amp;#039; user is a channel super-operator&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;~:&amp;#039;&amp;#039;&amp;#039; user is the channel owner&lt;br /&gt;
If user does not have any modes on that channel, returns an empty string or &amp;#039;&amp;#039;false&amp;#039;&amp;#039; if invalid arguments were passed.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example creates a function which can be used to check whether a user is voiced in a channel.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function isUserVoiced( theBot, channel, user )&lt;br /&gt;
    local botName = ircGetName( theBot )&lt;br /&gt;
    if botName then -- if the bot given was valid (it has a name)&lt;br /&gt;
        if ircIsInChannel( theBot, channel, user ) then -- if the user is in channel&lt;br /&gt;
            local userMode = ircGetUserMode( theBot, channel, user )&lt;br /&gt;
            if userMode and userMode:find( &amp;quot;+&amp;quot; ) then -- if valid arguments were passed, and &amp;#039;+&amp;#039; symbol is found in the user mode&lt;br /&gt;
                return true&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return false&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{ml_birc functions}}&lt;/div&gt;</summary>
		<author><name>Awwu</name></author>
	</entry>
</feed>