mIRC Home    About    Download    Register    News    Help

Print Thread
How to make on quit figure out what channel to hop #194407 03/02/08 09:12 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
How to make on quit to figure out wich channel i need to hop?

Code:
on 1:part:#:{
  if ($nick($chan,0) = 2) && ($nick != $me) && ($me !isop $chan) { hop -c $chan }
}

on 1:quit:{
  if !!!($nick(#,0) = 2) && ($nick != $me) && ($me !isop #)!!! { hop -c # }
}

Re: How to make on quit figure out what channel to [Re: Deep3D] #194409 03/02/08 10:28 PM
Joined: Jul 2006
Posts: 3,723
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,723
Code:
on !*:quit:{
  var %a = $comchan($nick,0) ,%b = $!comchan($nick,%a)
  while (%a) {
    if ($nick($(%b,2),0) == 2) && ($me !isop $(%b,2)) hop -c $v2
    dec %a
  }
}


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: How to make on quit figure out what channel to hop [Re: Deep3D] #194411 03/02/08 11:18 PM
Joined: Jan 2004
Posts: 509
L
LostShadow Offline
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Originally Posted By: Deep3D
on 1:quit:{
if !!!($nick(#,0) = 2) && ($nick != $me) && ($me !isop #)!!! { hop -c # }
}


What does adding the triple !!! do?

Do you think it is anything significant?

Code:
on !*:part:#: { 
  if ($nick($chan,0) > 2) { /halt }
  else {
    if (r isin $chan($chan).mode) {
      if ($me isreg $chan) { 
        /hop $chan | /mode $chan $+(+v,$iif(% isin $prefix,h $me)) $me
      } 
    }
    elseif (r !isin $chan($chan).mode) {
      if (($me isreg $chan) || ($me isvoice $chan)) && ($me !isop !chan) {
        /hop $chan | /mode $chan $+(+v,$iif(% isin $prefix,h $me)) $me
      }
    } 
  }
}

on !*:quit: { 
  var %i = 1 
  while ($comchan($nick,%i)) { 
    if ($nick($comchan($nick,%i),0) > 2) { /halt }
    else {
      if (r !isincs $chan($comchan($nick,%i)).mode) {
        if ($me !isop $comchan($nick,%i)) {
          /hop -c $comchan($nick,%i) | /mode $comchan($nick,%i) $+(+v,$iif(% isin $prefix,h $me)) $me 
        }
      } 
      elseif (r isincs $chan($comchan($nick,%i)).mode) {
        if ($me isreg $comchan($nick,%i)) {
          /hop -c $comchan($nick,%i)) | /mode $comchan($nick,%i) $+(+v,$iif(% isin $prefix,h $me)) $me
        }
      }
      inc %i 
    } 
    /unset %i 
  } 
}


What this does is for a registered (+r) channel, ChanServ will -o the 1st person who joins that is not AOp or SOp (as well as -h). But not -v.

So a +v will not /hop in a +r channel since that's technically the highest it could ever go.

And then if the channel isn't registered... like Efnet... well then, just as long as it ain't op it will /hop.

*Sigh*

-Neal.

Re: How to make on quit figure out what channel to [Re: LostShadow] #194417 03/02/08 11:36 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
Thanks to you both, great work. The !!! was just to mark the code that "diden't" work. smile

Re: How to make on quit figure out what channel to [Re: Deep3D] #194419 04/02/08 12:32 AM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
One more thing:

$iif(undernet.org OR quakenet.org isin $server,Channel Info):channel.info

Re: How to make on quit figure out what channel to [Re: Deep3D] #194420 04/02/08 12:51 AM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
$iif(undernet.org isin $server || quakenet.org isin $server,Channel Info):channel.info