mIRC Home    About    Download    Register    News    Help

Topic Options
#80668 - 26/04/04 06:43 AM Style 1 on and off switch
Kev_Uk Offline
Vogon poet

Registered: 22/12/02
Posts: 173
Loc: United Kingdom
I have a ctcp blocker that i made and trying to get it in the same format as i have something else that i use, here's what i have so far

CTCP Blocker
.Client Info %ctcp_blocker.clientinfo
..$iif(%ctcp_blocker.clientinfo == on,$style(1)) On: { set %ctcp_blocker.clientinfo On | .enable #ctcp_blocker.clientinfo | echo -a 0,2 CTCP Blocker (Client Info) is now 12,8 On  }
..$iif(%ctcp_blocker.clientinfo == off,$style(1)) Off: { set %ctcp_blocker.clientinfo Off | .disable #ctcp_blocker.clientinfo | echo -a 0,2 CTCP Blocker (Client Info) is now 12,8 Off  }

and he's how i would like it to look so it's like this

CTCP Blocker
(tick) Client Info

Of course i can't do the symbol tick on here so i typed tick in
Here;s something like that i have for something else that i have

.$iif(l isincs $gettok($chan(#).mode,1,32),$style(1)) Limit $chan(#).limit l : { mode # $iif(l isincs $gettok($chan(#).mode,1,32),-l,+l $$?="Set Size Limit") }


Top
#80669 - 26/04/04 11:44 AM Re: Style 1 on and off switch
Iori Offline
Hoopy frood

Registered: 30/08/03
Posts: 1831
Code:
CTCP Blocker
.$iif($group(#ctcp_blocker.clientinfo) == on,$style(1)) Client Info:{
  $iif($group(#ctcp_blocker.clientinfo) == on,.disable,.enable) #ctcp_blocker.clientinfo
  echo -a 0,2 CTCP Blocker (Client Info) is now 12,8  $group(#ctcp_blocker.clientinfo)   }
}

Top
#80670 - 26/04/04 05:46 PM Re: Style 1 on and off switch
Kev_Uk Offline
Vogon poet

Registered: 22/12/02
Posts: 173
Loc: United Kingdom
Cool thanks that worked although i tried doing the same thing for this but for some reason it was hiding the rest of the options

.Secure Query
..$iif(%secure.query == on,$style(1)) On: {.enable #secure.query }
..$iif(%secure.query == off,$style(1)) Off: { .disable #secure.query }
..-
..$iif(%secure.query.hop = 1,$style(1),) Half Ops:secure.query.switch hop | echo -a 0,2 Secure Query - Half Ops 12,8 $iif(%secure.query.hop = 0,Blocked,Allowed) 
..$iif(%secure.query.op = 1,$style(1),) Ops:secure.query.switch op | echo -a 0,2 Secure Query - Ops 12,8 $iif(%secure.query.op = 0,Blocked,Allowed) 
..$iif(%secure.query.voice = 1,$style(1),) Voices:secure.query.switch voice | echo -a 0,2 Secure Query - Voice 12,8 $iif(%secure.query.voice = 0,Blocked,Allowed) 

Top
#80671 - 28/04/04 02:40 AM Re: Style 1 on and off switch
Iori Offline
Hoopy frood

Registered: 30/08/03
Posts: 1831
Try it this way
Code:
.$iif($group(#secure.query) == off,Secure Query):.enable #secure.query
.$iif($group(#secure.query) == on,$style(1) Secure Query)
..$iif(%secure.query.hop,$style(1)) Half Ops:secure.query.switch hop | echo -a 0,2 Secure Query - Half Ops 12,8  $iif(%secure.query.hop,Allowed,Blocked)  
..$iif(%secure.query.op,$style(1)) Ops:secure.query.switch op | echo -a 0,2 Secure Query - Ops 12,8  $iif(%secure.query.op,Allowed,Blocked)  
..$iif(%secure.query.voice,$style(1)) Voices:secure.query.switch voice | echo -a 0,2 Secure Query - Voice 12,8  $iif(%secure.query.voice,Allowed,Blocked)   
..-
..Switch off:.disable #secure.query

Top