I'm looking to see if there is a script that will ask a user their age first before voicing them. If they are over a certain age they get voiced. If they don't answer in an allotted amount of time they will be kicked and banned for a minute. Repeat offenders or underage folks will be banned permanently.
Also is there a script that will scan the channels the user is on and kick them if they are in a #teen channel or something like that?
Anyone happened upon something like this out there? TIA.
This question might be better in the TCL Forum but to answer at least part of your question.........
I'm looking to see if there is a script that will ask a user their age first before voicing them. If they are over a certain age they get voiced. If they don't answer in an allotted amount of time they will be kicked and banned for a minute. Repeat offenders or underage folks will be banned permanently.
Yes I have seen it in several rooms but I'm not sure what it is called try searching the tcl achive.
Also is there a script that will scan the channels the user is on and kick them if they are in a #teen channel or something like that?
Again yes........do a search in the tcl archive using the words 'bad chan'
Thanks for the point in the right direction firepac.
I checked the TCL archives before I asked in here and didn't see the script I was looking for. I tried checking the greet scritps. I did a global searched on "age" and was returned a ton of scripts with the word "message" in them.
As for the bad channel, I searched for 'bad channel' and got a ton that had the word 'channel' in them. When I searched for 'bad chan' I found one and it doesn't seem to want to work for me. Maybe I'm just an idiot and just couldn't get it working.
# minimum age allowed (above 10) ?
set minage 18
# kick after how many seconds of silence ?
set aftsecs 30
bind join - * ask:user
bind pubm - 1? voice:user
proc ask:user {nick uhost hand chan} {
global aftsecs noans
puthelp "PRIVMSG $nick :What is your age please ?"
set noans([string tolower $nick]) 1
utimer $aftsecs [list kick:user $nick $uhost $chan]
}
proc voice:user {nick uhost hand chan arg} {
global minage noans
if {[lindex arg 0] >= $minage} {
putserv "MODE $chan +v $nick"
if {[info exists $noans([string tolower $nick])]} {
unset noans([string tolower $nick])
}
} {
## User is under age
}
}
proc kick:user {nick uhost chan} {
global noans
if {[info exists noans([string tolower $nick])]} {
newchanban $chan *!*@[lindex [split $uhost @] 1] noans "No answer For age" 1
unset noans([string tolower $nick])
}
}
this will ask the nick his age on join. if = or more than minimum age it will voice the user, if no answer after the set time he will be banned for 1 minute.
EDIT: corrected 'proc join' to 'proc ask:user'
Last edited by Sir_Fz on Thu Dec 25, 2003 6:53 pm, edited 1 time in total.
Thanks for all your effort in trying to c0de that script for me, but as of yet I am still reading up on the TCL language. I like to dabble in scripting but haven't had a chance to learn very much as of yet. Found a few documents and manuals on this site that have been very helpful.
I was really hoping to find the original pre-made script as it was actually a little more involved than just this. It repeated the ask at 20 second intervals, remembered the number of times the person answered wrong, permanently banned them after 3 tries and also had a maximum age of xx, responding with, "You're too old!!" heh In addition it aked through a notice and didn't care if the person said in channel simply "21" or said, "I am 21" it knew the difference.
Regardless, thanks for the sample. It has renewed my interest in learning the TCL language structure and syntax.