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.

On join and on text.

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
L
Liteqhs
Voice
Posts: 3
Joined: Tue Jan 03, 2006 10:24 pm

On join and on text.

Post by Liteqhs »

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

Post by demond »

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: Select all

 tag when posting logs, code
L
Liteqhs
Voice
Posts: 3
Joined: Tue Jan 03, 2006 10:24 pm

Post by Liteqhs »

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

Thanks
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

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: Select all

 tag when posting logs, code
L
Liteqhs
Voice
Posts: 3
Joined: Tue Jan 03, 2006 10:24 pm

Post by Liteqhs »

Thankyou demond for your time.
Post Reply