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 

On join and on text.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Liteqhs
Voice


Joined: 03 Jan 2006
Posts: 3

PostPosted: Tue Jan 03, 2006 10:34 pm    Post subject: On join and on text. Reply with quote

Hi i require a script that basically see's a client join a channel, the bot private messages the client with ".check".
The bot then waits 15 seconds for the client to reply with a set bit of text, this text can be in amongst a line of text but will be seperated by a space.
If the client replies with the set bit of text the bot will then ignore the client, however if the client doesn't reply in 15 seconds the bot will use a gline command to gline that client.

Thanks for help in advance!
Back to top
View user's profile Send private message
demond
Revered One


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

PostPosted: Tue Jan 03, 2006 11:27 pm    Post subject: Reply with quote

if you asked for ban I'd write this thing for you... but I'm an old timer who believes that glines, if at all necessary (which I doubt), should have nothing to do with channel matters
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Liteqhs
Voice


Joined: 03 Jan 2006
Posts: 3

PostPosted: Wed Jan 04, 2006 7:00 am    Post subject: Reply with quote

Ok, could you do it as a ban then please?

Thanks
Back to top
View user's profile Send private message
demond
Revered One


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

PostPosted: Thu Jan 05, 2006 1:41 am    Post subject: Reply with quote

Code:

bind msg - secret clear
bind join - {#chan *} warn
check #chan
proc check {chan} {
   if [info exists ::clients] {
   foreach {uhost ts} [array get ::clients] {
      if {[unixtime] - $ts < 15} continue
      set ban [maskhost *!$uhost]
      newchanban $chan $ban $::nick denied 15
      foreach nick [chanlist $chan] {
         if [string match $ban $nick![getchanhost $nick $chan]] {
            putkick $chan $nick denied
         }
      }
   }}
   utimer 15 [list check $chan]
}
proc clear {nick uhost hand text} {
   if [info exists ::clients($uhost)] {
      unset ::clients($uhost)
   }   
}
proc warn {nick uhost hand chan} {
   if [matchattr $hand of|of $chan] return
   puthelp "privmsg $nick :please identify"
   set ::clients($uhost) [unixtime]
}

obviously, here the magic word is "secret"
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Liteqhs
Voice


Joined: 03 Jan 2006
Posts: 3

PostPosted: Thu Jan 05, 2006 9:02 am    Post subject: Reply with quote

Thankyou demond for your time.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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