|
Joined: Jan 2003
Posts: 66
Babel fish
|
OP
Babel fish
Joined: Jan 2003
Posts: 66 |
I'm trying to write a script to kill bottler scripts that come on to our network.
on 1:JOIN:*: { set %blahfirst { userhost $nick } timer 1 2 set %blah $gettok(%blahfirst,2,64) timer 1 4 ctcp $nick version }
on *:ctcpreply:VERSION*Bottler*:{ echo -dt $nick is a bottler script ( $+ $1- $+ ) msg operserv akill add +2h %blah irc clients without chat features aren't allowed on this network. kill $nick irc clients without chat features aren't allowed on this network. HaltDef }
what's wrong with this?
note: the reason I'm using the %blah/userhost thing is just because our network masks users' hosts. normally the userhost is masked, and not complete.
|
|
|
|
Joined: Jan 2003
Posts: 66
Babel fish
|
OP
Babel fish
Joined: Jan 2003
Posts: 66 |
see first post
Last edited by maezr; 27/07/03 11:39 PM.
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
Well, what I'd suggest you do, instead of killing bottler, which would only make them reconnect, is 'disable' them from using your network. Create a line in your server's MOTD that reads: no bottler clients please If you have that, instead of just getting killed and trying to reconnect later, bottler will basically remove your server from its network list so it should never try and reconnect again. Imho it's better than using akill because this way your akill list doesn't have ~500 bans on it
|
|
|
|
Joined: Jan 2003
Posts: 66
Babel fish
|
OP
Babel fish
Joined: Jan 2003
Posts: 66 |
thanks, I'll talk to the admins and try to get that added. I still don't get why this doesn't work, though...
on *:ctcpreply:VERSION*Bottler*:{ echo -dt $nick is a bottler script ( $+ $1- $+ ) msg operserv akill add +2h $remove($mask($ial($nick),2),*!) irc clients without chat features aren't allowed on this network. HaltDef }
results in... -OperServ- Mask must be in the form [email]user@host.[/email]
any idea why?
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
If you add an echo -a $ial($nick) echo -a $remove($mask($ial($nick),2),*!)
What does it print?
|
|
|
|
Joined: Jan 2003
Posts: 66
Babel fish
|
OP
Babel fish
Joined: Jan 2003
Posts: 66 |
* /echo: insufficient parameters (line 4, script18.mrc)
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
|
|
|
|
Joined: Jan 2003
Posts: 66
Babel fish
|
OP
Babel fish
Joined: Jan 2003
Posts: 66 |
echo -a $ial($nick)
weird. echo -a ial works fine when I do it manually right after I /userhost them...
|
|
|
|
Joined: Jan 2003
Posts: 66
Babel fish
|
OP
Babel fish
Joined: Jan 2003
Posts: 66 |
sometimes it doesn't work at all, others it adds it but with the masked host, and others it adds the correct unmasked host :\
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
That's probably due to lag. on *:JOIN:#:{
ctcp $nick version
}
on *:ctcpreply:VERSION*bottler*:{
echo -dt $nick is a bottler script ( $+ $1- $+ )
set %isbottler $+ $nick 1
userhost $nick
haltdef
}
raw 302:*:{
var %t = $gettok($2,1,61)
if ( $eval($+(%,isbottler,$iif($right(%t,1) == *,$left(%t,-1),%t)),2) ) {
msg operserv akill add +2h $remove($mask($ial($nick),2),*!) IRC clients without chat features aren't allowed on this network.
kill $nick IRC clients without chat features aren't allowed on this network.
unset $eval($+(%,isbottler,%t))
haltdef
}
} Something like that should work, although there are probably better ways of doing it.
|
|
|
|
Joined: Jan 2003
Posts: 66
Babel fish
|
OP
Babel fish
Joined: Jan 2003
Posts: 66 |
-> *operserv* akill add +2h IRC clients without chat features aren't allowed on this network. - -OperServ- Mask must be in the form [email]user@host.[/email] - You cant kill a server!
I get that with that script. x_X
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
Bah, I know why it didn't work, but I'm not sure why I thought it worked when I tested it :/, I'll post a version that works properly later.. Edit:Attempt to redeem myself: on *:JOIN:#:{
ctcp $nick version
}
on *:CTCPREPLY:VERSION*bottler*:{
echo -dt $nick is a bottler script ( $+ $1- $+ )
set %isbottler $+ $nick 1
userhost $nick
haltdef
}
raw 302:*:{
var %t = $gettok($2,1,61), %n = $iif($right(%t,1) == *,$left(%t,-1),%t))
if ( $eval($+(%,isbottler,%n),2) ) {
msg operserv akill add +2h $remove($mask($ial(%n),2),*!) IRC clients without chat features aren't allowed on this network.
kill %n IRC clients without chat features aren't allowed on this network.
unset $eval($+(%,isbottler,%n))
haltdef
}
}
|
|
|
|
|