| View previous topic :: View next topic |
| Author |
Message |
Liteqhs Voice
Joined: 03 Jan 2006 Posts: 3
|
Posted: Tue Jan 03, 2006 10:34 pm Post subject: On join and on text. |
|
|
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 |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Tue Jan 03, 2006 11:27 pm Post subject: |
|
|
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 |
|
 |
Liteqhs Voice
Joined: 03 Jan 2006 Posts: 3
|
Posted: Wed Jan 04, 2006 7:00 am Post subject: |
|
|
Ok, could you do it as a ban then please?
Thanks |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Thu Jan 05, 2006 1:41 am Post subject: |
|
|
| 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 |
|
 |
Liteqhs Voice
Joined: 03 Jan 2006 Posts: 3
|
Posted: Thu Jan 05, 2006 9:02 am Post subject: |
|
|
| Thankyou demond for your time. |
|
| Back to top |
|
 |
|