mIRC Home    About    Download    Register    News    Help

Print Thread
#233533 22/08/11 08:27 PM
Joined: Apr 2011
Posts: 7
B
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Apr 2011
Posts: 7
I want this addon

(( Auto rejoin on empty channel to get Ops ))

Backfire #233534 22/08/11 09:36 PM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
Code:
on !*:PART:#: if ($nick(#,0) == 1) hop #
on !*:QUIT:{
  var %x = 1,%c
  while ($comchan($Nick,%x)) {
    %c = $v1
    if ($nick(%c,0) == 1) hop %c
    inc %x
  }
}



Fixed On Part, and on Quit. Sorry about that, wasn't paying much attention

Last edited by FroggieDaFrog; 23/08/11 03:01 AM.

I am SReject
My Stuff
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
I think your quit event needs a little adjusting on the "$chan" because there's no $chan in the quit event:
Code:
on !*:QUIT:{
  var %x = 1
  while ($comchan($Nick,%x)) {
    var %c = $v1
    if ($nick(%c,0) == 1) hop %c
    inc %x
  }
}
And you were probably in a hurry or something. You seemed to have missed the '#' for your part event too:
Code:
on !*:PART:#:{

Last edited by Tomao; 22/08/11 10:17 PM.
Tomao #233537 22/08/11 10:15 PM
Joined: Jul 2006
Posts: 4,151
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,151
The on part event also needs its channel parameter wink


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #233538 22/08/11 10:16 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Yeah Wims, I just spotted that now. :p

Tomao #233547 23/08/11 02:59 AM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
I was in a hurry. And thanks for fixing it. I edited my first post so it should be fixed. smile


I am SReject
My Stuff
Joined: Feb 2006
Posts: 546
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 546
channel nicklists aren't yet updated in the middle of those events. $nick(#chan, 0) will be 2 if you're the only one left in #chan.


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
jaytea #233554 23/08/11 03:23 PM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
Code:
on !*:PART:#: if ($me !isop # && $nick(#,0) == 2) hop #
on !*:QUIT:{
  var %x = 1,%c
  while ($comchan($Nick,%x)) {
    %c = $v1
    if ($me !isop %c && $nick(%c,0) == 2) hop %c
    inc %x
  }
}


I am SReject
My Stuff

Link Copied to Clipboard