mIRC Home    About    Download    Register    News    Help

Print Thread
Groups Help #186334 21/09/07 01:03 AM
Joined: Jan 2007
Posts: 31
P
piker Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jan 2007
Posts: 31
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?

Re: Groups Help [Re: piker] #186335 21/09/07 01:04 AM
Joined: Apr 2007
Posts: 228
M
Mpot Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
/groups

And /echo?

Perhaps?

Re: Groups Help [Re: Mpot] #186337 21/09/07 02:04 AM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
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)
}

Re: Groups Help [Re: Bekar] #186342 21/09/07 02:32 AM
Joined: Jan 2007
Posts: 31
P
piker Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jan 2007
Posts: 31
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?

Re: Groups Help [Re: piker] #186347 21/09/07 04:09 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Re: Groups Help [Re: piker] #186479 23/09/07 09:48 AM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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 }
}