Modules/IRCEcho/ircGetStatus: Difference between revisions
Jump to navigation
Jump to search
(New page: __NOTOC__ {{ModuleFunction|IRCEcho}} Can be used to check if the user has Op or higher ==Syntax== <syntaxhighlight lang="lua"> function ircGetStatus ( IRCConnection irc, string channel, string nick ) </...) |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{ModuleFunction|IRCEcho}} | {{ModuleFunction|IRCEcho}} | ||
Can be used to | Can be used to get the given nick's access level on a channel. | ||
'''Returns the following numbers:''' | |||
*0: Normal user | |||
*1: Voice (+v - +nick) | |||
*2: Half-Op (+h - %nick) | |||
*3: Operator (+o - @nick) | |||
*4: Admin/Super-Op (+a - &nick) | |||
*5: Owner (+q - ~nick) | |||
==Syntax== | ==Syntax== |
Latest revision as of 10:03, 22 November 2008
This function is provided by the external module IRCEcho. You must install this module to use this function. | |
Can be used to get the given nick's access level on a channel.
Returns the following numbers:
- 0: Normal user
- 1: Voice (+v - +nick)
- 2: Half-Op (+h - %nick)
- 3: Operator (+o - @nick)
- 4: Admin/Super-Op (+a - &nick)
- 5: Owner (+q - ~nick)
Syntax
function ircGetStatus ( IRCConnection irc, string channel, string nick )
Required arguments
- irc: The IRCConnection
- channel: The channel that you want to check on
- nick: The person that you want to check on
Example
Example 1: This script can be used from irc, so people can check their rights
function irc_onPrivMsg( szChannel, szNick, szText ) if string.find( szText, "!rights" ) == 1 then ircMessage( pIRC, szChannel, szNick .. ", you have level " .. tostring( ircGetStatus( pIRC, szChannel, szNick ) ) end end