mIRC Home    About    Download    Register    News    Help

Print Thread
#186334 21/09/07 01:03 AM
P
piker
piker
P
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?

#186335 21/09/07 01:04 AM
M
Mpot
Mpot
M
/groups

And /echo?

Perhaps?

#186337 21/09/07 02:04 AM
Joined: Dec 2002
Posts: 503
B
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)
}

Bekar #186342 21/09/07 02:32 AM
P
piker
piker
P
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?

#186347 21/09/07 04:09 AM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
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.

#186479 23/09/07 09:48 AM
Joined: Nov 2006
Posts: 1,552
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,552
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 }
} 



Link Copied to Clipboard