mIRC Home    About    Download    Register    News    Help

Print Thread
#118116 22/04/05 01:47 PM
Joined: Apr 2005
Posts: 53
A
Babel fish
OP Offline
Babel fish
A
Joined: Apr 2005
Posts: 53
Is it possible to make the script that checks the channel every 5 minutes and ops people who are on auto op list or level 2000?

grin

#118117 22/04/05 02:27 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
on *:op:#:{
  if ($opnick == $me) { .timer 0 300 opcheck $chan }
}
alias opcheck {
  if ($me isop $1) {
    var %i = 1
    while ($nick($1, %i)) {
      if ($v1 isaop) || ($level($address($v1, 5)) == 2000) { mode $1 +o $nick($chan, %i) }
      inc %i
    }
  }
}


New username: hixxy
#118118 22/04/05 04:01 PM
Joined: Apr 2005
Posts: 18
B
Pikka bird
Offline
Pikka bird
B
Joined: Apr 2005
Posts: 18
to make a little improvement:

use $nick($1, %i, hvr) instead of $nick($1, %i) to check only those people that aren't already an op and stop opping them several times.

#118119 22/04/05 07:26 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Good point.. but instead of using hvr you can use ao to mean 'anyone except ops'

Code:
on *:op:#:{
  if ($opnick == $me) { .timer 0 300 opcheck $chan }
}
alias opcheck {
  if ($me isop $1) {
    var %i = 1
    while ($nick($1, %i, ao)) {
      if ($v1 isaop) || ($level($address($v1, 5)) == 2000) { mode $1 +o $nick($chan, %i) }
      inc %i
    }
  }
}


New username: hixxy
#118120 22/04/05 08:13 PM
Joined: Apr 2005
Posts: 18
B
Pikka bird
Offline
Pikka bird
B
Joined: Apr 2005
Posts: 18
then you should use $nick($1, %i, a, o) instead of $nick($1, %i, ao)

and not only in the condition of the while-loop but also the if-statement.

Code:
on *:op:#:{  
  if ($opnick == $me) { .timer 0 300 opcheck $chan }
}
alias opcheck {  
  if ($me isop $1) {    
    var %i = 1    
    while ($nick($1, %i, a, o)) {      
      if ($v1 isaop) || ($level($address($v1, 5)) == 2000) { mode $1 +o $nick($chan, %i, a, o) }      
      inc %i    
    }  
  }
}
 


only problem if you this method on ircX-servers the owners (+q) will still be affected, which is not the case with hvr (actually vr is enough since h is not used on most ircX servers)


Link Copied to Clipboard