mIRC Home    About    Download    Register    News    Help

Print Thread
#159678 19/09/06 02:42 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Is it possible to make a script that will deop a op thats not using is real op nick access from a text file where I will store the real op nick and if they change nick while op it would auto deop. Just deop not remove access.

#159679 19/09/06 02:53 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
on @*:op:#channel:{
  if (!$read($scriptdir $+ ops.txt,nw,$opnick)) { mode $chan -o $opnick }
}
on *:nick:{
  if ($me isop #channel) && ($newnick isop #channel) && (!$read($scriptdir $+ ops.txt,nw,$newnick)) { mode #channel -o $newnick }
}


If you want it to work on all channels, try this:

Code:
on @*:op:#:{
  if (!$read($scriptdir $+ ops.txt,nw,$opnick)) { mode $chan -o $opnick }
}
on *:nick:{
  var %i = 1
  while ($comchan($newnick,%i)) {
    if ($me isop $v1) && ($newnick isop $v2) && (!$read($scriptdir ops.txt,nw,$v1)) { mode $comchan($newnick,%i) -o $newnick }
    inc %i
  }
}


ops.txt needs to be in the same directory as the script.

#159680 19/09/06 03:00 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Thx hixxy
Will this deop aop and sop ?

on @*:op:#:{
if (%opnick == off) || !%opnick || ($nick isop #) { return }
if (!$read($scriptdir $+ ops.txt,nw,$opnick)) { mode $chan -o $opnick }
}
on *:nick:{
var %i = 1
while ($comchan($newnick,%i)) {
if ($me isop $v1) && ($newnick isop $v2) && (!$read($scriptdir ops.txt,nw,$v1)) { mode $comchan($newnick,%i) -o $newnick }
inc %i
}
}

#159681 19/09/06 03:12 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Should do.. they're no different to regular ops..

Code:
on @*:op:#:{
  if (%opnick == off) || (!%opnick) || ($nick isop #) { return }
  if (!$read($scriptdir $+ ops.txt,nw,$opnick)) { mode $chan -o $opnick }
}
on *:nick:{
  var %i = 1
  while ($comchan($newnick,%i)) {
    if ($me isop $v1) && ($newnick isop $v2) && (!$read($scriptdir $+ ops.txt,nw,$v1)) { mode $comchan($newnick,%i) -o $newnick }
    inc %i
  }
} 


There was a small mistake. Try this one.

#159682 19/09/06 03:17 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Ok cool thx.
Ok if I understand right it will deop all nicks thats not stored in my list ? If i dont add certain op will they get auto deop or just ignore?

#159683 19/09/06 03:20 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
It should deop everyone not in your list.

#159684 19/09/06 03:22 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Is it possible to exempt some op ??

#159685 19/09/06 03:25 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
on @*:op:#:{
  if (%opnick == off) || (!%opnick) || ($nick isop #) || ($read($scriptdir $+ exempts.txt,nw,$opnick)) { return }
  if (!$read($scriptdir $+ ops.txt,nw,$opnick)) { mode $chan -o $opnick }
}
on *:nick:{
  if ($read($scriptdir $+ exempts.txt,nw,$newnick)) { return }
  var %i = 1
  while ($comchan($newnick,%i)) {
    if ($me isop $v1) && ($newnick isop $v2) && (!$read($scriptdir $+ ops.txt,nw,$v1)) { mode $comchan($newnick,%i) -o $newnick }
    inc %i
  }
} 


Put the list of ops in exempts.txt in the same directory as the script.

#159686 19/09/06 03:31 PM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Thank you sir.


Link Copied to Clipboard