mIRC Home    About    Download    Register    News    Help

Print Thread
#247456 03/08/14 05:09 PM
Joined: Aug 2014
Posts: 32
S
Sparkz Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2014
Posts: 32
Does anyone know if there is a way for the broadcaster to make the bot leave and join the channel? I want a script that will make the bot unload all of the script pages on command and then load them back up on command. If someone could please help me out with this it will be appreciated.

Sparkz #247458 03/08/14 09:11 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
What do you mean by "the broadcaster" ?

To load/unload all scripts:

Code:
on $*:text:/^!(un)loadall$/:#:{
  if (xyz) {
    ; in the line above you should do some kind of check to make sure that the user is authorised to use the command.
    if ($regml(1) == un) {
      var %i = 1
      while ($script(%i) != $null) {
        if ($script(%i) == $script) {
          inc %i
          continue
        }
        .unload -rs $qt($script(%i))
      } 
    }
    else { noop $findfile(<script directory here>,*.mrc,0,.load -rs $qt($1-)) }
  }
}


!loadall and !unloadall


Link Copied to Clipboard