egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

no ctcp version

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
Kurupt
Voice


Joined: 22 Aug 2004
Posts: 26
Location: Hermanstat

PostPosted: Thu Aug 25, 2005 5:35 pm    Post subject: no ctcp version Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Thu Aug 25, 2005 6:11 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Kurupt
Voice


Joined: 22 Aug 2004
Posts: 26
Location: Hermanstat

PostPosted: Thu Aug 25, 2005 6:29 pm    Post subject: Reply with quote

would it work on 1500 nicks, i know that
Code:

putserv "privmsg #chan :\001VERSION\001"


but not so good with arrays
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Thu Aug 25, 2005 6:44 pm    Post subject: Reply with quote

yes, and it will also work on 15000 Smile

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber