mIRC Homepage

Groups Help

Posted By: piker

Groups Help - 21/09/07 01:03 AM

is there any way to check via scripting if a group is enabled or not?

#test on
alias lala { echo $chan lala }
#test end

-------------
Question 2:
and is there any way to turn off some pieces of an event?
Posted By: Mpot

Re: Groups Help - 21/09/07 01:04 AM

/groups

And /echo?

Perhaps?
Posted By: Bekar

Re: Groups Help - 21/09/07 02:04 AM

see $group(N/#):
Code:
#group on
ON *:TEXT:*:*: echo -s boo!
#group off
alias check_group {
  echo -a Group '#group' is: $iif($group(#group).status == on, On, Off)
}
Posted By: piker

Re: Groups Help - 21/09/07 02:32 AM

Great bekar $group(#groupname) was what I was after.

Maybe you (or anybody else) wants to help with my other question? I've an event script right and I want to be able to turn off some features of it like

on *:join:#:{
#test on
some event stuff here
#test off
if (etc etc.. <- rest of the event script
}
when i do something like this it returns an error. Is there any way to do this or will I just have to make the event twice and enclose it in different group names so if one is enabled the other is desabled and vice versa?
Posted By: Riamus2

Re: Groups Help - 21/09/07 04:09 AM

Groups can't be within events afaik. You can set it up as duplicate events with one inside the on group and one inside the off groups, or you could use alias(es) in the same way.
Posted By: Horstl

Re: Groups Help - 23/09/07 09:48 AM

If you really don't want to use a global var or the like you could use a dummy group as switch, but that's not what they're made for smile
Code:
#dummy off
#dummy end

on *:join:#:{
  if ($group(#dummy) == on) { some event stuff here }
  if (etc etc..) { <- rest of the event script }
} 

© 2022 mIRC Discussion Forums