mIRC Home    About    Download    Register    News    Help

Print Thread
#204334 16/09/08 01:57 AM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
So I've been out of the game for several months now, and I've gone and forgotten how to use groups and I can't seem to find the help file. I remember something like

#asdf on
code
#asdf end

But I'm not sure if that's correct. Furthermore, is there an identifier to indicate whether or not a group is turned on or off?

Thanks.

Mpot #204336 16/09/08 02:14 AM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Your example is correct.

/enable #asdf
/disable #asdf
//echo -a $group(#asdf)

/help groups

Mpot #204337 16/09/08 02:15 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
That is correct. As to the identifier, you're looking for $group(#group_name) or $group(N).status

You should be able to call up the help file from inside mIRC, using /help


RusselB #204353 16/09/08 06:51 PM
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
Thanks for the refresher guys. That was exactly what I've needed and I found the help file as well.

Mpot #208510 22/01/09 06:11 AM
Joined: Nov 2006
Posts: 143
X
Vogon poet
Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
menu channel {
Protection
.On:./enable #prot
.Off:./disable #prot
}
i see 'Protection' in channel right click but want make it 'Protection Off' when #prot is already enabled so ill click it and disable #prot confused i just want to make it easy to turn on/off.

xyzzy #208511 22/01/09 06:32 AM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Use $iif conditions to build a switch.
In addition, you could show the current group status per $group(Name).status, or indicate the current group status with $iif and $style, or change the menu text ("name the switch") according to the group status...
Three examples:

Code:
menu channel {
  Protection
  .Toggle Protection : $iif(($group(#prot).status == on),disable,enable) #prot
}

menu channel { 
  Protection $+([,$group(#prot).status,]) : $iif(($group(#prot).status == on),disable,enable) #prot
}

menu channel {
  $iif(($group(#prot).status == on),$style(1)) Protection 
  .$iif(($group(#prot).status == on),disable,enable) Protection : $iif($group(#prot).status == on,.disable,.enable) #prot
}

Horstl #208512 22/01/09 07:27 AM
Joined: Nov 2006
Posts: 143
X
Vogon poet
Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
Thankss Horstl i just work on it a bit and get what i needed from ur code this part what i were wanted cheers
menu channel {
.$iif(($group(#flood).status == on),disable,enable) Protection : $iif($group(#flood).status == on,.disable,.enable) #flood
}


Link Copied to Clipboard