mIRC Homepage

menu nicklist

Posted By: danielboom

menu nicklist - 01/12/21 04:47 PM

menu nicklist,status,query {
$iif($me isop $chan || $me isvoice || $me isreg $chan,Op)
.Chorras
...Comida
}

isreg made a error

any help?
Posted By: Epic

Re: menu nicklist - 01/12/21 07:38 PM

It all depends on what exactly you want to do with this part of the code and what you expect the result. Your problem is that you never make a big description of what you want to do and what the script should do. Because of this, one has to guess and build theories, which leads to an unwillingness to guess other people's riddles without clearly stated conditions for solving a certain problem. If you could explain in more detail what you specifically want to do and what your code should check, then perhaps we would have found some other way to solve this problem, without resorting to the way that you are trying to use, and without trying untangle this tangle.

Also, you have a syntax error. The correct syntax and examples for "$iif" are described here: https://en.wikichip.org/wiki/mirc/identifiers/$iif or https://www.mirc.com/help/html/index.html?other_identifiers.html#id_$iif

I can only guess, what you wanted to create something similar to this:
Code
menu nicklist {
  Nick Status:{
    if ($$1 isop $chan) /echo -a $$1 - OP
    if ($$1 isvoice $chan) /echo -a $$1 - VOICE
    if ($$1 isreg $chan) /echo -a $$1 - USER
  }
}

If you still have questions on this topic, please state them here in a more detailed and understandable form.
Posted By: Epic

Re: menu nicklist - 02/12/21 01:16 PM

This topic was discussed with author of the question in the IRC chat and a solution was found. The problem has been resolved.
The task was to hide (make inaccessible) a certain menu item, for example the item "Slaps", if the user (You) has no rights "Op" or "Voice" on the channel.

An example of a script for a menu:
Code
menu nicklist,query {
  $iif($menu == nicklist,$iif($meop($chan),Slaps),Slaps)
  .Example Item1
  ..Example Item2: /me tests the fish tail slap on $$1 !!! 8-]
}
alias meop { if ($me isop $1) || ($me isvoice $1) { return $true } }


Perhaps it will be useful for someone else to know and will come in handy in the future, to solve a similar problem.
© 2022 mIRC Discussion Forums