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 

script for an #idle type channel

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


Joined: 07 Oct 2006
Posts: 25

PostPosted: Sun Aug 31, 2008 5:18 am    Post subject: script for an #idle type channel Reply with quote

Hi, Ive search all over for a script to do what I want without much luck.

I am trying to set up an #idle type channel and need a script (or settings) that would auto kick/ban people for 30 minutes for talking in the channel.
Back to top
View user's profile Send private message
nsrafk
Halfop


Joined: 11 May 2007
Posts: 73

PostPosted: Sun Sep 07, 2008 5:27 am    Post subject: Reply with quote

You can just use a badword script i guess, and add wildcards.. * means anyword.. seems useless tho :p
Back to top
View user's profile Send private message
swarfega
Voice


Joined: 07 Oct 2006
Posts: 25

PostPosted: Sun Sep 07, 2008 6:47 pm    Post subject: Reply with quote

Thanks for the idea about using a bad words script which I am doing and works ok. What I would like to do is a ban counter. Could any one help integrate that into the code below:


Code:
bind pubm -|- * blocked:words

setudef flag bwords

#Rlsdate : 28-05-2003

#? and * works as wildcards
set bwords(words) "*"
#Allow pflag to use these words ?
set bwords(p) 1
set bwords(pflag) o

#How long time to last ? must be in minutes.
set bwords(mins) 30

bind ctcp -|- * blocked:words2

proc blocked:words2 {nick uhost handle dest keyword text} {
 if {[validchan $dest]} { blocked:words $nick $uhost $handle $dest $text }
}

proc blocked:words {nick uhost handle chan text} {
global botnick bwords
 set word [join [lindex [split $text] 0]]
  if {![string match "*+bwords*" [channel info $chan]]} { return 0 }
  if {[matchattr $handle $bwords(pflag)|$bwords(pflag) $chan] && $bwords(p)==1} { return 0 }
  foreach w [split $bwords(words) " "] {
   if {[string match [join $w] [join $word]]} {
    set nck [split [getchanhost $nick] "@"]
    set b1 [split [lindex $nck 1] "\."]
    set domain [lindex $b1 [expr [llength $b1]-2]].[lindex $b1 [expr [llength $b1]-1]]
    set banmask *![lindex $nck 0]@*.$domain
    newchanban $chan $banmask $botnick "$bwords (mins) mins anti-idle ban. ([strftime %m-%d-%Y@%H:%M])" $bwords(mins)
    putlog "Banned $nick@$chan for using $word."
    return 0
   }
  }
}

putlog "Bwords loaded v2.1 : Bad words list = $bwords(words)"
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