| View previous topic :: View next topic |
| Author |
Message |
Kurupt Voice

Joined: 22 Aug 2004 Posts: 26 Location: Hermanstat
|
Posted: Thu Aug 25, 2005 5:35 pm Post subject: no ctcp version |
|
|
| On a chan are some bots that have ignore to ctcp version, so my question is how to ban the nicks that don't respond to version. Thanks, some ideeas would do it because i have no ideea now, if they don't respond how should i know. And secound i don't whant to version every nick i whant to version the chan. |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Thu Aug 25, 2005 6:11 pm Post subject: |
|
|
you need to [bind ctcr] and then
| Code: |
putserv "privmsg #chan :\001VERSION\001"
|
in your CTCR handler you need to flag each nick that you have received reply from, possibly using an array; then, after some timeout, you would scan that array to see which nicks haven't replied yet, and proceed with the bans |
|
| Back to top |
|
 |
Kurupt Voice

Joined: 22 Aug 2004 Posts: 26 Location: Hermanstat
|
Posted: Thu Aug 25, 2005 6:29 pm Post subject: |
|
|
would it work on 1500 nicks, i know that
| Code: |
putserv "privmsg #chan :\001VERSION\001"
|
but not so good with arrays |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Thu Aug 25, 2005 6:44 pm Post subject: |
|
|
yes, and it will also work on 15000
here's how to do that:
| Code: |
foreach n [chanlist #chan] {set moo($n) 0}
putserv "privmsg #chan :\001VERSION\001"
timer 1 bar
bind ctcr - VERSION foo
proc foo {n u h d k t} {set ::moo($n) 1}
proc bar {} {
foreach {n f} [array get ::moo] {
if {!$f} {
# $n has not responded, ban it
}
}
}
|
|
|
| Back to top |
|
 |
|