Is there a way to turn your bots scripts off for a channel, like disable or enable it?
I don't think there is such a command, so I am guessing it's a script? I don't know how to make one.
Thanks in advance.
I use a variable for that.
Normally a script would start with:
on *:TEXT:sometrigger:*:{
I replace that with:
on *:TEXT:sometrigger:%botchannel:{
Now, if you put in the variables window a variable:
%botchannel #channel1,#channel2,#channel3
The above script will only work on the channels that are specifed in that variable.
I like having it this way, since I can easily control where the scripts will work, and where not...
There are other ways, but this is what I use for it.
Good luck.
Ok, I get the first line, but Im still learning scripts, sooo, I don't really get the rest.
What kind of "bot" do you have? Is it another mirc opened, an mirc script that uses another instance of mirc? Or a socket connected bot? For enable and disable i use a variable which sets itself on if i type /toggleblah and if i type it again it goes off. I use the $iif() for that.
$iif(%bottoggle,unset %bottoggle,set %bottoggle on)
which is:
if %bottoggle is set, unset it. Else if it's unset, set it.
Well, another easy way is:
if $chan == #channelname { to work for only that chan
or
if ($chan == #channelname) { Halt } to work in all the channels bot that channel.
This isnt the best way to do it but its just another way you can.
I think I got what you want. Use groups.
remote script:
#botscripts on
on 1:text:*:#: {
your stuff
}
alias morestuff { blah blah }
#botscripts end
That bit of script is enabled, typing "/disable #botscripts" in a command window will turn it off:
#botscripts off
on 1:text:*:#: {
your stuff
}
alias morestuff { blah blah }
#botscripts end
typing "/enable #botscripts" will turn it on again. When off, mirc ignores the information between #botscripts off and #botscripts end
So does it do it for a specific channel, or for the whole bot's mIRC window?
And yes, I'm using a custom made bot, in another window.