mIRC Homepage
Posted By: skysurfer Where is the mistake? - 08/09/03 06:30 PM
Hey, I was trying to write a simple auto-voice-script, since
I don`t really like av-function which is already part of MIRC
6.03. My deliberation was to work with levels:

I used the command /guser av nick hostmasktype to
add a users hostmask to the userlist, cause the script
should voice a user reliant on his hostmask. The "av" should
provide that only users will be voiced who are registered in
the userlist with "av".

To check, whether the user is registered in my userlist, I use this one:

on av:JOIN:#channel: { mode $chan +v $nick }

Well, but it won`t work! smile Where is the mistake or is the
complete concept wrong?

May u can help me, thanks!
Posted By: Naz Re: Where is the mistake? - 08/09/03 06:46 PM
I don't see anything wrong with what u posted. Might want to make sure remotes are turned on. -> /remote on
Posted By: SladeKraven Re: Where is the mistake? - 08/09/03 08:13 PM
/guser av NickName Hostmasktype
Lets assume the host mask type is 3.
Code:
on 1:JOIN:#: {
  if ($me isop $chan) && (av == $level($address($nick,3))) {
    mode $chan +v $nick
  }
  else { Peform some more commands. }
}

Also /remote on, which was already suggested. grin
Posted By: LocutusofBorg Re: Where is the mistake? - 08/09/03 08:24 PM
If the user is in the userlist, on @av:JOIN:#: mode # +v $nick should work just fine. The if statement with $level is nice, but it seems terribly bloated to me. Also you can kill the first if statement that checks for op with using the @ prefix. Both codes should work though. If they don't, there's another problem.
Posted By: SladeKraven Re: Where is the mistake? - 08/09/03 09:12 PM
The only other thing I can think of is two on JOIN events, it should work as I did /guser av Andy 3 and did //echo $level($address(Andy,3)) and it returned av so there shouldn't be a problem checking if the user is in the userlist.
© mIRC Discussion Forums