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.

wordbk.tcl

Old posts that have not been replied to for several years.
Locked
C
Commari

Post by Commari »

# WORD TEMPRARY BAN-KICK v0.2
# eggdrop/tcl script by _Trojan_ (trojan@trojan.res.wpi.edu)
# inspired by all the lamers that say banned words to be kicked.
#
# This script will automatically bankick someone if they say the banned
# word, they will be banned for $btime minutes (define below)
#
# how long should they be banned? (mins)
set btime 1
#
# bind the command (as many times as you want)
set banwords { lesta lestat putrid [censored] peelox xiit ziit xi17 x117 x1i7 x11t xi1t xi1t huara }

foreach bw $banwords {
bind pubm - "*${bw}*" wordbk

}

proc wordbk {nick uhost hand arg} {
global channel btime banwords
if {[botisop]} {
set target [finduser ${nick}!${uhost}]
if {$target != "*"} {
if {([matchattr $target n] || [matchattr $target m])} {
return 0
}
}
### find out which word they said, so they know not to say it again.
set bword ""
foreach bw $banwords {
if {[string match $bw $arg]} {
append bword "${bw}, "
}
}
### SOMETHING must have gone wrong... hrmmm...
if {$bword == ""} { putlog bleh ; return 0 }
### if the person is already banned, don't add another one, just KICK!
### this should only be neccessary when enforce-ban is set to 0
if {[matchban ${nick}!${uhost}]} {
putserv "KICK $channel $nick " you said the following banned word(s): ${bword}buh-bye!"
} else {
### get the ban ready
set banaddr [maskhost ${nick}!${uhost}]
### add the ban
addban $banaddr " you said the following banned word(s): ${bword}buh-bye!"
### in btime minute(s) unban the lamer
timer $btime [putserv "MODE $channel -b $banaddr"]
}
return 0
}
return 0
}

Now, I don't understand what I'm sposed to do! It says bind the cmd etc.
What cmd? The bind pubm? I can't get that script working :sad:
W
Wcc
Master
Posts: 278
Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:

Post by Wcc »

its the "set banwords {stuff here}"
Locked