mIRC Home    About    Download    Register    News    Help

Print Thread
#222382 18/06/10 05:03 AM
Joined: Mar 2010
Posts: 17
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Mar 2010
Posts: 17
Hey there, I am having a bit of a problem here with this. I have a remove script entered into my mIRC that is "on +20,+90:JOIN:#testing:/mode #testing +v $nick". For some reason even though a +20 user joins, the +v happens, but it does not happen with the +90 user for some reason and wondering what the problem is. Thank you for any help with this.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
To my knowledge, you can't have multiple levels specified in the <level> section of the event (in this case, ON JOIN), so the code is only recognizing the first +20 for the level.

You could re-write the event to use a wildcard level, then check the actual userlevel with $ulevel or you could copy your ON JOIN event and specify +20 for one event and +90 for the other.

Joined: Mar 2010
Posts: 17
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Mar 2010
Posts: 17
I am thinking that it is this that I needed to have instead if I wanted to only have users on levels 20, 80, and 90 to be voiced in the channel.
Code:
on @*:JOIN:#testing:{
  if ($ulevel == 20) { mode #testing +v $nick }
  elseif ($ulevel == 90) { mode #testing +v $nick }
  elseif ($ulevel == 80) { mode #testing +v $nick }
  else { halt }
}

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
ErikMouse, of all the if and elseifs, not to mention the else is not needed, you can simply do this with $istok:
Code:
on @*:JOIN:#testing:{
  if ($istok(20 80 90,$ulevel,32)) {
    mode # +v $nick
  }
}
You only need to specify the #testing in the join event. You don't have to indicate the channel in the mode command.


Link Copied to Clipboard