|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
on @*:op:#chat:{ if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) || ($read($scriptdir $+ exempts.op,nw,$opnick)) { return } if (!$read($scriptdir $+ guardian.op,nw,$opnick)) { mode $chan -o $opnick } } on *:nick:{ if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) { return } if ($read($scriptdir $+ exempts.op,nw,$newnick)) { return } var %i = 1 while ($comchan($newnick,%i)) { if ($me isop $v1) && ($newnick isop $v2) && (!$read($scriptdir $+ guardian.op,nw,$v1)) { mode $comchan($newnick,%i) -o $newnick } inc %i } }
Can I also add full ban with a kick msg on deop?
Last edited by Garou; 28/10/06 03:50 PM.
|
|
|
|
Joined: Jan 2003
Posts: 2,973
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,973 |
I'm not sure I understand what you want to happen, but here is one way to take your request:
on @*:op:#chat:{
if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) || ($read($scriptdir $+ exempts.op,nw,$opnick)) { return }
if (!$read($scriptdir $+ guardian.op,nw,$opnick)) {
;mode $chan -o $opnick
[color:red]mode $chan -o+b $nick $wildsite
kick $chan $nick You have been kicked for unauthorized op[/color]
}
}
on *:nick:{
if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) { return }
if ($read($scriptdir $+ exempts.op,nw,$newnick)) { return }
var %i = 1
while ($comchan($newnick,%i)) {
if ($me isop $v1) && ($newnick isop $v2) && (!$read($scriptdir $+ guardian.op,nw,$v1)) {
;mode $comchan($newnick,%i) -o $newnick
[color:red]mode $comchan($newnick,%i) -o+b $newnick $wildsite
kick $comchan($newnick,%i) $nick You have been kicked for unauthorized op[/color]
}
inc %i
}
}
I commented out your previous line just incase, and added two more. If you meant to ban when you deop them, this is your solution. If you want a ban on deop (as in the on DEOP event) then I'd have to rewrite this solution.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
This is perfect thx KingTomato.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
This kick msg didnt work?
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
The first part of the code red does not ban and the kick msg does not work. The second part does work but again no kick msg.
Can anyone check what the error is?
|
|
|
|
Joined: Jan 2003
Posts: 2,973
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,973 |
I'm sorry, I goofed on the identifiers.
on @*:op:#chat:{
if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) || ($read($scriptdir $+ exempts.op,nw,$opnick)) { return }
if (!$read($scriptdir $+ guardian.op,nw,$opnick)) {
;mode $chan -o $opnick
mode $chan -o+b $opnick $wildsite
kick $chan $opnick You have been kicked for unauthorized op
}
}
on *:nick:{
if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) { return }
if ($read($scriptdir $+ exempts.op,nw,$newnick)) { return }
var %i = 1
while ($comchan($newnick,%i)) {
if ($me isop $v1) && ($newnick isop $v2) && (!$read($scriptdir $+ guardian.op,nw,$v1)) {
;mode $comchan($newnick,%i) -o $newnick
mode $comchan($newnick,%i) -o+b $newnick $wildsite
kick $comchan($newnick,%i) $newnick You have been kicked for unauthorized op
}
inc %i
}
}
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
on @*:op:#chat:{ if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) { return } if (!$read($scriptdir $+ guardian.op,nw,$opnick)) { ;mode $chan -o $opnick mode $chan -o+b $opnick $wildsite kick $chan $opnick 14Your nick does not have op access on this channel } }
on *:nick:{ if ( %opnick == off ) || ( %opnick == $null ) || ($nick isop #chat) { return } if ($read($scriptdir $+ guardian.op,nw,$opnick)) { return } var %i = 1 while ($comchan($newnick,%i)) { if ($me isop $v1) && ($newnick isop $v2) && (!$read($scriptdir $+ guardian.op,nw,$v1)) { ;mode $comchan($newnick,%i) -o $newnick mode $comchan($newnick,%i) -o+b $newnick $wildsite kick $comchan($newnick,%i) $newnick 14Your nick does not have op access on this channel } inc %i } }
[11:10] * Mode (ChanServ:#chat +o _a`hay) [11:10] * Mode (Linuxx:#chat -o+b _a`hay *!*@dal.net) [11:10] * _a`hay was kicked by Me (Your nick does not have op access on this channel
On op it will deop but bans dalnet instead of the user any ideal why?
Last edited by Garou; 30/10/06 04:39 PM.
|
|
|
|
Joined: Jan 2003
Posts: 2,973
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,973 |
Yea, I used $wildsite to ban the user not knowing you're using DAL net. DAL net uses a bogus mask in an effort to keep everyone anonymous. Try replacing $wildsite with this: $address
To further specify a mask, fool around with $address(name,mask) where name is the name of the person, and mask is a numeric value such as 1, 2, 3, etc. Find ne that works using something like: //echo -a $address($me,mask)
Just keep changing mask until you find one you like. Then put this code in your script but use $opnick and $newnick instead of $me.
|
|
|
|
Joined: Jun 2006
Posts: 506
Fjord artisan
|
Fjord artisan
Joined: Jun 2006
Posts: 506 |
[11:10] * Mode (ChanServ:#chat +o _a`hay) [11:10] * Mode (Linuxx:#chat -o+b _a`hay *!*@dal.net) [11:10] * _a`hay was kicked by Me (Your nick does not have op access on this channel ... On op it will deop but bans dalnet instead of the user any ideal why?
ChanServ opped _a`hay The ban mask matches ChanServ!service@dal.net. If you don't want the user opped, remove their access from ChanServ.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Ya all I did was to add var %i = 1 and I removed $wildsite and its working now :P
if (!$read($scriptdir $+ guardian.op,nw,$opnick)) { var %i = 1 ;mode $chan -o $opnick mode $chan -o+b $opnick
|
|
|
|
|