mIRC Home    About    Download    Register    News    Help

Print Thread
User level. #240662 20/02/13 03:15 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I dont know what i missing here, using this for join:
Code:
on 3:join:#: { command }

But it triggers even due the user have other levels, it even trigger on me when i join with lvl 999.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: User level. [Re: sparta] #240663 20/02/13 04:45 PM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Are your user levels correctly formatted?
See /help User List
You may be using the first level incorrectly.

Re: User level. [Re: 5618] #240665 20/02/13 06:13 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I adding the user with: .auser 3 $address($1,3) .


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: User level. [Re: sparta] #240668 21/02/13 12:16 AM
Joined: Oct 2012
Posts: 164
D
Deega Offline
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
If you want the event to only trigger for the specified user level use the + prefix.
Code:
on +3:join:#: { command }

Re: User level. [Re: Deega] #240673 21/02/13 07:50 AM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Just to explain Deega's post in more detail...

By default, when you specify a userlevel number it will trigger the event for everybody on that level or lower, so, for example, on 3:join: would trigger for levels 3, 2 and 1. on 5:join: would trigger for 5, 4, 3, 2 and 1.

The + prefix makes it ONLY match the specified userlevel.

Somewhat related is the fact that using on 1:join: will only match people who either aren't in your user list or have a numbered user level; it won't match somebody with a named user level. To match *everyone* you should use *, like so: on *:join:.

Re: User level. [Re: hixxy] #240674 21/02/13 07:57 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I know this, but it dont explain why it trigger on lvl 999, thats "my" level. I only have my nick added as lvl 999 no need for host since no one can steal my nick when i have it, and the match for lvl 3 using the users host.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: User level. [Re: sparta] #240676 21/02/13 12:40 PM
Joined: Oct 2012
Posts: 164
D
Deega Offline
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Your level 999 is higher than 3. Users can access any events matching or less than their access level, noting that only the highest matching event is triggered.
on 3:event: <- This triggers for all users with a level of 3 or greater.
on +3:event <- triggers for ONLY users with level 3


Edit:
You can also prevent level 999 users from triggering it by adding their level at "=999" which gives that user access only to level 999 events.

Last edited by Deega; 21/02/13 01:04 PM.
Re: User level. [Re: hixxy] #240677 21/02/13 12:44 PM
Joined: Oct 2012
Posts: 164
D
Deega Offline
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Originally Posted By: hixxy
By default, when you specify a userlevel number it will trigger the event for everybody on that level or lower, so, for example, on 3:join: would trigger for levels 3, 2 and 1. on 5:join: would trigger for 5, 4, 3, 2 and 1.

Actually the other way around, level 3 events match for anyone with an access level of 3 or greater.
on 5:join: would trigger for acess levels 5, 6, 7, .... 999. Not for 4, 3, 2, or 1.

Re: User level. [Re: Deega] #240682 21/02/13 06:07 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Of course, my bad. Getting rusty!