mIRC Home    About    Download    Register    News    Help

Print Thread
#269664 01/12/21 04:47 PM
Joined: Mar 2021
Posts: 25
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Mar 2021
Posts: 25
menu nicklist,status,query {
$iif($me isop $chan || $me isvoice || $me isreg $chan,Op)
.Chorras
...Comida
}

isreg made a error

any help?

Joined: Jan 2012
Posts: 301
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 301
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.


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Jan 2012
Posts: 301
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 301
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.

Last edited by Epic; 02/12/21 04:10 PM. Reason: fixed in the code - menu hide should work only in nicklist

🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples

Link Copied to Clipboard