mIRC Home    About    Download    Register    News    Help

Print Thread
#11964 19/02/03 08:58 AM
Joined: Dec 2002
Posts: 94
K
krunch Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Dec 2002
Posts: 94
this is what i have
popups
Code:
$iif($me isop # , Opperator Controls)
.$submenu($opcontrols($snick($chan,1),$chan))

Code:
alias opcontrols {
  var %x
  set %a $left($nick($2,$nick($2,$nick($2,$1))).pnick,1)
  if (%a == @) { var %x op }
  elseif (%a == %) { var %x halfop }
  elseif (%a == +) { var %x voice }
  else { var %x nobody }
  if (%x == op) { return deop:/  }
}

it sets all the var's but wont show up? what am i missing?


Lets get dirty
#11965 19/02/03 09:33 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
You arent' using $submenu like you're supposed to. Read the help file (/help $submenu), you'll see there that the alias called by $submenu must be passed $1 and only that: not other identifiers etc. You also didn't explain what you want this code to do.

In case you have trouble understanding $submenu, there's a tutorial on $submenu by blue-elf on mircscripts.org tutorial section.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#11966 19/02/03 10:18 AM
Joined: Dec 2002
Posts: 94
K
krunch Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Dec 2002
Posts: 94
just playing around with submenus
wanted to make it so when opped it would display all the mode options i could use
when voiced show control' etc


Lets get dirty
#11967 19/02/03 11:11 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
I'm still not sure what you want, but I'll take a guess:
Code:
menu nicklist,channel {
  Operator Controls
  .$submenu($opcontrols($1))
}
alias opcontrols {
  if $1 isnum && $snick(#,$1) { 
    var %nick = $ifmatch, %p = $left($nick(#,%nick).pnick,1)
    goto %p
    :@ | return Deop %nick : mode # -o %nick
    :% | return Dehelp %nick : mode # -h %nick
    :+ | return Devoice %nick : mode # -v %nick
    :%p
  }
}


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#11968 19/02/03 12:39 PM
Joined: Dec 2002
Posts: 94
K
krunch Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Dec 2002
Posts: 94
yes sorta smile thanks give me something to work with


Lets get dirty

Link Copied to Clipboard