mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 129
A
AaronL Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Jan 2004
Posts: 129
hi all.

not sure if i can explain it well, but here goes:

i have a dialog called OpsSetup containing a button named Ops (obvious) to Op someone. smile

Question is: is it possible to enable the ops button as soon as $me is opped. like....
Code:
on *:op:#: { if ($opnick == $me) { enable the button } }
on *:deop:#: { if ($opnick == $me) { disable the button } }


thnxs in advange
Greetz
Aaron


Deridio fatum
Joined: May 2003
Posts: 41
D
Ameglian cow
Offline
Ameglian cow
D
Joined: May 2003
Posts: 41
id = button id in OpsSetup dialog IE: 3

if dialog is open use

on *:op:#: { if ($opnick == $me) { did -e OpsSetup ID } }
on *:deop:#: { if ($opnick == $me) { did -b OpsSetup ID } }


but you may need to add if not open
on *:DIALOG:OpsSetup:init:0:{
if ($me isop #channel) { did -e OpsSetup ID }
if ($me !isop #channel) { did -b OpsSetup ID }
}

pretty new to this hope it helps

or to totally hide the button use -h
and to make it visible again -v


If At First You Don't Succeed, Ask Someone For Help......
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I played around with it a bit:

Code:
dialog opcheck {
  title ""
  size -1 -1 100 100
  option pixels
  button "ops", 900,  25 40 50 20
}
on *:dialog:opcheck:init:0:{ did -b opcheck 900 }

on *:op:#:{ checkop $chan }

on *:SERVEROP:#:{ checkop $chan }

on me:join:#:{ .timerifop 1 1 checkop $chan }

alias checkop {
  if ($me isop $$1) {
    if (!$dialog(opcheck)) { dialog -m opcheck opcheck }
    did -e opcheck 900
  }
}

Joined: Jan 2004
Posts: 129
A
AaronL Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Jan 2004
Posts: 129
Damsulegna: i tried that but didn't work. thanxs for the efforts tho. smile

MikeChat: Awesome works perfectly. I even added elseif do did -b, so it disables the button when i do a deOp.
thank you for your great help. i'm impressed smile

Greetz
Aaron


Deridio fatum
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
smile Glad its working out for you smile


Link Copied to Clipboard