|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
hi guys, I want to add a line not to kick if the nick is register, is this possible?
on @*:join:#:{ if ($left($nick,-4) isalpha && $right($nick,2) isnum) { ban -ku600 # $nick 2 14Spam Bot Detected } }
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
It's possible, but in order to ensure that the code is written correctly we'll need the name of the network that the code is being used on. While there is a basic format that most networks use, some networks have a slightly different format when it comes to relaying the information regarding if a nick is registered or not.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
on @*:join:#:{
if (($left($nick,4) isalpha) && ($right($nick,2) isnum)) {
set %nick $nick
set %chan $chan
.ns acc %nick
}
}
on *:notice:*acc*:*:{
if $3 < 2 {
ban -ku600 %chan %nick 2 14Spam Bot Detected
}
}
Something I noticed, that I'm a bit curious about, you check $left($nick,-4) isalpha, which means that it's checking if the last 4 characters are alphabetic, and you check $right($nick,2) isnum, which checks for the last two characters to be numbers. Since your code requires both of these to be true, there's no way both of them can be true..one or the other, but not both. Example: Bairstow22 joins the channel $left($nick,-4) = ow22 is ow22 alphabetic? No, so the first condition is false $right($nick,2) == 22 is 22 numeric? Yes, so the second condition is true Are both the first and second conditions true? No, so nothing else happens. I understand about the numeric comparison, but I don't understand how you figured using $left($nick,-4) would work with it. I didn't change it in the code, because I don't understand it, but you might want to rethink what's happening there, or let us know what you want to happen, and we'll see what we can do to fix it up.
Last edited by RusselB; 16/09/06 04:02 PM.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Yes please fix it if you think its not right. The code is supose to kick nicks like these here: adbeuf22, wwwwwwww1567 or hbrkm333 and allo_99
Last edited by Garou; 16/09/06 02:07 PM.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I need to know what it's supposed to do, before I can see about fixing it.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Yes please fix it if you think its not right. The code is supose to kick nicks like these here: adbeuf22, wwwwwwww1567 or hbrkm333 and allo_99
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Try my edited code. It will check nickserv registration if the nick starts with 4 letters and ends with 2 numbers, irrelevant as to what (if anything) is in between.
|
|
|
|
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 |
RusselB your codes send me a notice if the nick is register or not. What I need is for my codes not to Kick if the nick is already registered.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Sorry...the notice comes from nickserv whether it's a registered nick or not. The difference in the notices is the number at the end. If that number is 0 then the nick isn't registered. If that number is 1 then the nick isn't online or the person using the nick hasn't identified for it. If that number is 2 then then person using the nick is on an authorized users list. If the number is 3 then the person using the nick has identified for the nick with the password.
I corrected my code (or at least I hope I did.. LOL)
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
on @*:join:#:{ if ($left($nick,4) isalpha && $right($nick,2) isnum) { set %nick $nick set %chan $chan .ns acc %nick } } on ^*:notice:%nick acc ?:*:{ if $3 < 2 { ban -ku600 %chan %nick 2 14Spam Bot Detected } }
This is wat i see [11:08] -NickServ (service@dal.net)- Erika10 ACC 0 but it does not kick those ACC 0
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Code copied, tested, edited, tested, edited, tested (repeated until worked), edited in post.
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
What channel are you on, and what nick are you using? Or visit me in #A-Truth-or-A-Dare on DalNet. I'll be there for at least another hour.
|
|
|
|
Joined: Aug 2006
Posts: 45
Ameglian cow
|
Ameglian cow
Joined: Aug 2006
Posts: 45 |
[ 16:28:25 ] * You were kicked from #A-Truth-or-A-Dare by RusselB (4Spam Bot Detected) - [ 16:28:25 ] #A-Truth-or-A-Dare unable to join channel (address is banned) - [ 16:28:49 ] #A-Truth-or-A-Dare unable to join channel (address is banned) - [ 16:28:51 ] #A-Truth-or-A-Dare unable to join channel (address is banned) - [ 16:29:20 ] #A-Truth-or-A-Dare unable to join channel (address is banned)
it seems to be working just fine to me and i was the test subject for this
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
Maybe i didnt paste the right codes or something so please post the codes again?
Last edited by Garou; 16/09/06 08:54 PM.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
on @*:join:#A-Truth-or-A-Dare:{
set %nick $nick
if (($left(%nick,4) isalpha) && ($right(%nick,2) isnum)) {
set %chan $chan
.ns acc %nick
}
}
on *:notice:*acc*:*:{
if $3 < 2 {
ban -ku600 %chan %nick 2 4Spam Bot Detected
}
}
|
|
|
|
Joined: Aug 2006
Posts: 469
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2006
Posts: 469 |
It works fine I forgot to add my channel. I know am a dork. Thx guys.
|
|
|
|
|