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.

Looking for a script.

Old posts that have not been replied to for several years.
Locked
B
BigSmoke

Looking for a script.

Post by BigSmoke »

Hi,

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.

BigSmoke
f
firepac
Voice
Posts: 31
Joined: Wed Jun 18, 2003 5:41 am
Location: Queensland, Australia

Post by firepac »

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'
B
BigSmoke

Post by BigSmoke »

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. :-?

Should I post this in the TCL forum?

Thanks again.

BigSmoke
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

# 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.
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

Sir_Fz wrote:bind join - * ask:user

proc join {nick uhost hand chan} {
Shouldn't that be 'proc ask:user'? :P
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Ofcurse it does ! who did that mistake :oops: lol :P
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Someone named Sir_Fz :mrgreen: do you knw that guy? :D
Once the game is over, the king and the pawn go back in the same box.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Oh yeah, he's a great person :P hehe.

anyway I edited it :P hush..
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

Sir_Fz wrote:Oh yeah, he's a great person :P hehe.
Someone has a big ego, and it's not me...:P
B
BigSmoke

Thanks for all your efforts.

Post by BigSmoke »

Sir_Fz,

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.

Thanks again.

BigSmoke
Locked