mIRC Home    About    Download    Register    News    Help

Print Thread
#260748 10/06/17 01:13 AM
Joined: Jun 2017
Posts: 20
A
Angela Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Jun 2017
Posts: 20
Is it possible to have On/off switch for an ON *:text:!request*:#: {

Angela #260749 10/06/17 01:34 AM
Joined: Jan 2017
Posts: 57
Babel fish
Offline
Babel fish
Joined: Jan 2017
Posts: 57
Indeed!(Kinda)
Code:
on *:TEXT:!request*:#: {
  if (%Switch == false) { halt }
  ;Insert the rest of your code here.
}

A simple "if" leading to a /halt will suffice. Now for the "Kinda" part. I don't know how to tell the "on Text" event to literally stop listening, I just know how to make it shut up.

The only thing you have to come up with is a method to make %Switch true/false.

Last edited by KubosKube; 10/06/17 01:36 AM. Reason: Added relevant info.
KubosKube #260753 10/06/17 06:34 PM
Joined: Jan 2005
Posts: 192
Vogon poet
Offline
Vogon poet
Joined: Jan 2005
Posts: 192
Depending on the specific scenario. You can also take a look at Groups. Groups are designed specifically for enabling/disabling parts of scripts.

/help Groups


echo -a $signature
Brax #260769 13/06/17 08:23 AM
Joined: Jun 2017
Posts: 20
A
Angela Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Jun 2017
Posts: 20
Thanks the Groups command works perfectly!


Link Copied to Clipboard