mIRC Home    About    Download    Register    News    Help

Print Thread
#38623 27/07/03 11:09 PM
M
maezr
maezr
M
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.

M
maezr
maezr
M
see first post

Last edited by maezr; 27/07/03 11:39 PM.
C
codemastr
codemastr
C
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 smile

M
maezr
maezr
M
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?

C
codemastr
codemastr
C
If you add an
echo -a $ial($nick)
echo -a $remove($mask($ial($nick),2),*!)

What does it print?

M
maezr
maezr
M
* /echo: insufficient parameters (line 4, script18.mrc)

C
codemastr
codemastr
C
Uhh which one is line 4?

M
maezr
maezr
M
echo -a $ial($nick)

weird. echo -a ial works fine when I do it manually right after I /userhost them...

M
maezr
maezr
M
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,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
That's probably due to lag.
Code:
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.

M
maezr
maezr
M
-> *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,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
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:
Code:
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
  }
}


Link Copied to Clipboard