|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
This is not supose to kick the user if they have op or voice on a channel. Any ideal ??
if (%drone == off) || !%drone || (%options.exempt == on) { return } if $numtok($3-,32) > 9 && !$istok(@ +,$3-,32) { ban -k #chat-room $2 2 14Drone Bot Detected } }
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
There's too much information missing from that for a determination. Please post all of the relevant code, including the activation event, and the group(s) that are called (if any). While it's good to not post too much code for a problem, not having enough code is (in my opinion) worse.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
This is all the code. My script does a silence whois on join and I also can turn on a random whois.
raw 319:*:{ if (%drone == off) || !%drone || (%options.exempt == on) { return } if $numtok($3-,32) > 9 && !$istok(@ +,$3-,32) { ban -k #chat-room $2 2 14Drone Bot Detected } }
|
|
|
|
Joined: Mar 2004
Posts: 210
Fjord artisan
|
Fjord artisan
Joined: Mar 2004
Posts: 210 |
How do %drone and %options.exempt get set? Whether the kick activates or not depends on these values. If they're set wrong for an op, the op still gets kicked.
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
!$istok(@ +,$3-,32) This is looking for the 319 raw having @ or + all by itself as the entire $3- string, but i always see 319 returning strings like @#test or +#test
Depending on how your network replies, you might want $wildtok($3-,@#*,1,32) $wildtok($3-,+#*,1,32)
This also nails someone only if they're in more than 9 channels.
Depending on what you're trying to stop, you might want to have a slight timer-delay in doing the whois-on-join, if services isn't giving them their op or voice before the whois gives their 319 channel list.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Try this instead raw 319:*:{
if (%drone != off) && (%options.exempt == on) {
if $numtok($3-,32) > 9 {
var %a = 1, %b = $numtok($3-,32)
unset %ban
while %a <= %b {
if $left($gettok($3-,%a,32),1) != @ && $v1 != + {
set %ban $2
}
inc %a
}
if %ban == $2 && $me isop #chat-room {
ban -k $v2 $2 2 Drone Bot Detected
}
}
}
}
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Your code does not work
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Ok I change this line and now its working but it still kban users even if they have @ or +
if (%drone != off) && (%options.exempt == on) {
to:
if ( %drone == off ) || ( %drone == $null ) || ($nick isop #) || (%options.exempt == on) { return }
Last edited by Garou; 28/08/06 01:34 AM.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
In future, if a code doesn't work, please give some indication as to how you know it's not working. This has been tested. raw 319:*:{
if (%drone != off) && (%options.exempt != on) {
if $numtok($3-,32) > 9 {
var %a = 1, %b = $numtok($3-,32)
unset %ban
while %a <= %b {
if $left($gettok($3-,%a,32),1) == $chr(35) {
set %ban $2
}
inc %a
}
if (%ban == $2) && ($me isop #chat-room) {
ban -k $v2 $2 2 Drone Bot Detected
}
}
}
}
Last edited by RusselB; 28/08/06 02:18 AM.
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
Your code still doesn't make sense. Inside the raw 319, the '#' symbol isn't defined, and $nick is the name of the server.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Well I test the codes thats why I know. Dont ask me why but This is the only way its working for me.
raw 319:*:{ if ( %drone == off ) || ( %drone == $null ) || ($nick isop #) || (%options.exempt == on) { return } if $numtok($3-,32) > 9 { var %a = 1, %b = $numtok($3-,32) unset %ban while %a <= %b { if $left($gettok($3-,%a,32),1) == $chr(35) { set %ban $2 } inc %a } if %ban == $2 && $me isop #chat-room { ban -k $v2 $2 2 14Drone Bot Detected } } } }
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
As maroon said, and as I pointed out to you in an earlier topic, # has no value inside the raw, so the comparison ($nick isop #) will always return false. I realized that I had a small typo in the code that I posted here, and that has been corrected.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
This is what I am using and I get this error. * /if: invalid format (line 16, dialog22.op)
raw 319:*:{ if (%drone != off) && (%options.exempt != on) { if $numtok($3-,32) > 9 { var %a = 1, %b = $numtok($3-,32) unset %ban while %a <= %b { if $left($gettok($3-,%a,32),1) == $chr(35) { set %ban $2 } inc %a } if (%ban == $2) && ($me isop #chat-room { ban -k $v2 $2 2 14Drone Bot Detected } } } }
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
since you didn't tell us which was line 16 of your script, i assume it's this line, since it has mis-matched parenthesis:
if (%ban == $2) && ($me isop #chat-room {
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Yes sorry its this line here.
if (%ban == $2) && ($me isop #chat-room {
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
As was stated, you're missing a parantheses...specifically the closing parantheses between the specified channel name and the open brace.
if (%ban == $2) && ($me isop #chat-room) {
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Yes thx I fixed that but its still kban even if the user has @ or +
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Post the EXACT code that you're using so that it can be compared with the last code I posted, which was tested on 3 networks.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
raw 319:*:{ if (%drone != off) && (%options.exempt != on) { if $numtok($3-,32) > 11 { var %a = 1, %b = $numtok($3-,32) unset %ban while %a <= %b { if $left($gettok($3-,%a,32),1) == $chr(35) { set %ban $2 } inc %a } if (%ban == $2) && ($me isop #chat-room) { ban -k $v2 $2 2 14Drone Bot Detected } } } }
|
|
|
|
Joined: Jan 2004
Posts: 2,127
Hoopy frood
|
Hoopy frood
Joined: Jan 2004
Posts: 2,127 |
raw 319:*:{ if (%drone != off) && (%options.exempt != on) && ($nick(#chat-room,$me,~&@%)) { if $numtok($3-,32) > 11 { if ($wildtok($3-,#*,$numtok($3-,32),32)) ban -k #chat-room $2 2 14Drone Bot Detected } } } The wildtok is counting how many channels "words" begin with the # symbol, and if there are X channels/words, and there are X channels/words that begin with the # symbol, then all the channels began with the # symbol, and you can skip the while-loop Also, it's pointless to even do all the checking without first making sure you're an op. The $nick(#chat-room,$me,~&@%) is checking whether you're Founder/Sop/Op/HalfOp, as they all have the power to ban - it's up to you whether you want any halfops doing so or not.
|
|
|
|
|