|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
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.
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
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:
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.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
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 } }
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
Should do.. they're no different to regular ops..
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.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
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?
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
It should deop everyone not in your list.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Is it possible to exempt some op ??
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
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.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
|
|
|
|
|
|