This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

no ctcp version

Old posts that have not been replied to for several years.
Locked
User avatar
Kurupt
Voice
Posts: 26
Joined: Sun Aug 22, 2004 7:57 pm
Location: Hermanstat

no ctcp version

Post by Kurupt »

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.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

you need to [bind ctcr] and then

Code: Select all

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
User avatar
Kurupt
Voice
Posts: 26
Joined: Sun Aug 22, 2004 7:57 pm
Location: Hermanstat

Post by Kurupt »

would it work on 1500 nicks, i know that

Code: Select all

putserv "privmsg #chan :\001VERSION\001" 
but not so good with arrays
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

yes, and it will also work on 15000 :)

here's how to do that:

Code: Select all

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
      }
   }
}
Locked