From WikiChip
Editing mirc/access levels
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | {{ | + | {{mIRC Guide}} |
'''Access levels''' in [[mIRC]] are a mechanism by which events can be restricted to certain user levels or named groups. Almost all [[On events - mIRC|events]] have a level parameter that specifies the event's access level. | '''Access levels''' in [[mIRC]] are a mechanism by which events can be restricted to certain user levels or named groups. Almost all [[On events - mIRC|events]] have a level parameter that specifies the event's access level. | ||
Line 9: | Line 9: | ||
Access levels are comma-delimited values that define the levels of the user. Although usually, the levels are numeric, you can use a name instead like "botAdmin" or "friends". | Access levels are comma-delimited values that define the levels of the user. Although usually, the levels are numeric, you can use a name instead like "botAdmin" or "friends". | ||
− | The < | + | The <info> parameter is an optional parameter that can be used to store some additional information about the user or other useful miscellaneous data. |
10,20:some!one@example.com | 10,20:some!one@example.com | ||
friend:dan!z@some.isp.net high school friend | friend:dan!z@some.isp.net high school friend | ||
− | + | == Adding/Removing users == | |
There are two commands that can be used to add a user to the access list, {{mIRC|/auser}} and {{mIRC|/guser}}. They follow this syntax: | There are two commands that can be used to add a user to the access list, {{mIRC|/auser}} and {{mIRC|/guser}}. They follow this syntax: | ||
Line 29: | Line 29: | ||
</source> | </source> | ||
− | |||
The {{mIRC|/ruser}} command can be used to remove a user completely from the access list or simply remove one of his levels. | The {{mIRC|/ruser}} command can be used to remove a user completely from the access list or simply remove one of his levels. | ||
Line 36: | Line 35: | ||
</source> | </source> | ||
− | For example: | + | === For example: === |
<source lang="mIRC"> | <source lang="mIRC"> | ||
/ruser madman 2 | /ruser madman 2 | ||
Line 42: | Line 41: | ||
</source> | </source> | ||
− | |||
The user info parameter can be changed at any time using the {{mIRC|/iuser}} command: | The user info parameter can be changed at any time using the {{mIRC|/iuser}} command: | ||
Line 49: | Line 47: | ||
</source> | </source> | ||
− | == | + | === Usage === |
− | + | The <level> parameter of an event is used to indicate which level/group can activate that event. For example: | |
− | |||
− | |||
− | The | ||
− | |||
<source lang="mIRC"> | <source lang="mIRC"> | ||
− | on | + | on 10:text:.hello:#:{ |
− | + | msg $chan Hello $nick $+ ! | |
} | } | ||
</source> | </source> | ||
− | + | Notice the access level defined is 10. In this case any user in your access list level 10 or above will trigger this event. | |
− | |||
− | + | == Level prefixes == | |
− | + | mIRC offers a verity of prefixes to slightly alter how the event activates. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | === | + | === ! prefix === |
− | + | The exclamation mark prefix can be used to prevent an event from being activated by you. | |
− | |||
− | |||
− | The | ||
− | |||
− | |||
− | |||
− | |||
− | |||
For example: | For example: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<source lang="mIRC"> | <source lang="mIRC"> | ||
on !1:join:#support:{ | on !1:join:#support:{ | ||
Line 101: | Line 71: | ||
} | } | ||
</source> | </source> | ||
− | will never get activated by you joining #support, only other people. | + | |
+ | The event above will never get activated by you joining #support, only other people. | ||
=== @ prefix=== | === @ prefix=== | ||
Line 107: | Line 78: | ||
For example: | For example: | ||
+ | |||
<source lang="mIRC"> | <source lang="mIRC"> | ||
on @10:text:.op:#myChan:{ | on @10:text:.op:#myChan:{ | ||
Line 112: | Line 84: | ||
} | } | ||
</source> | </source> | ||
− | will only work if you are an operator in #myChan at the time the user typed ".o". | + | |
+ | The code above will only work if you are an operator in #myChan at the time the user typed ".o". | ||
=== & prefix === | === & prefix === | ||
− | The '''& prefix''' can be used to prevent the event from being executed if the previous event called the {{mIRC|/haltdef }} or {{mIRC|/halt}} commands | + | The '''& prefix''' can be used to prevent the event from being executed if the previous event called the {{mIRC|/haltdef }} or {{mIRC|/halt}} commands. |
− | + | === * prefix === | |
+ | This prefix can be used to allow any user to activate the event regardless of their access level. | ||
− | + | For Example: | |
− | |||
− | + | <source lang="mIRC"> | |
− | <source lang="mIRC">on | + | on *:text:.calc *:#:{ |
+ | notice $nick $2- = $calc($replace($2-, pi, $pi)) | ||
+ | } | ||
+ | </source> | ||
− | + | === + prefix === | |
+ | By default, the numeric prefix means that level and any level higher can trigger that event. Using the + prefix, you can limit the event to be exactly the level specified. | ||
− | + | For example: | |
− | |||
<source lang="mIRC"> | <source lang="mIRC"> | ||
− | on | + | on +5:text:.h:#myChan:{ |
− | + | mode $chan +h $nick | |
} | } | ||
</source> | </source> | ||
+ | |||
+ | The code above will only work for users with access level of exactly 5. Any user with higher access level will not activate that event. | ||
=== Named access levels === | === Named access levels === | ||
Line 153: | Line 131: | ||
</source> | </source> | ||
− | + | [[Category:mIRC]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | [[Category:mIRC |