You need to set the nick as a variable or something, same with the channel, the code dosent know where to op whom right now.. im not shure how you should add the info in the best way tho..
but $active = the dialog you have open, $1 return nothing..
how ever, if you right klick on a nick and bring up the dialog, then i can help a bit..
set %nick $nick or $1
set %chan $chan
then you do: /mode %chan +o %nick in the dialog..
you dont need to set $$, one $ sign is enuff..