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.
Old posts that have not been replied to for several years.
Nucleus
Voice
Posts: 34 Joined: Fri Jul 09, 2004 3:35 am
Post
by Nucleus » Tue Jul 26, 2005 3:54 pm
Code: Select all
bind pubm - "*badword1*" swproc
bind pubm - "*badword2*" swproc
bind pubm - "*badword3*" swproc
bind pubm - "*badword4*" swproc
set swdura 600
set swkick "Swearing"
######## CODE - DO NOT TOUCH ########
bind ctcp - ACTION ctcp:badword
proc ctcp:badword {nick uhost hand chan keyword text} {
if {[string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text]} {
swproc $nick $uhost $hand $chan $text
}
}
putlog "=====>> Swearing Protection Loaded"
This script gives me this error in the partyline.
Code: Select all
[22:16] Tcl error [swproc]: invalid command name "swproc"
[22:23] Tcl error [swproc]: invalid command name "swproc"
[22:24] Tcl error [swproc]: invalid command name "swproc"
Whats wrong with it? How do i fix it?
r0t3n
Owner
Posts: 507 Joined: Tue May 31, 2005 6:56 pm
Location: UK
Post
by r0t3n » Tue Jul 26, 2005 3:59 pm
the proc 'swproc' does not exist maybe
. And why so many string match -nocase's
.
r0t3n @ #r0t3n @ Quakenet
Nucleus
Voice
Posts: 34 Joined: Fri Jul 09, 2004 3:35 am
Post
by Nucleus » Tue Jul 26, 2005 4:05 pm
i have no idea. Any suggestions on fixing it?
r0t3n
Owner
Posts: 507 Joined: Tue May 31, 2005 6:56 pm
Location: UK
Post
by r0t3n » Tue Jul 26, 2005 5:06 pm
Code: Select all
set badwords {
"badword"
"badword1"
"badword2"
"badword3"
"etc"
}
bind pub - * pub:badword
proc pub:badword {nick host hand chan text} {
if {![matchattr $hand nmo|nmof]} {
if {[string match "*$badwords*" $text]} {
set badword $text
putserv "KICK $chan $nick $badword is a badword"
}
}
}
Try that. Set badwords to the badwords you want. If a badword is detected, the person is kicked from the channel.
Tell me what you want in it, kick and then ban the user. Just ask me
.
r0t3n @ #r0t3n @ Quakenet
Nucleus
Voice
Posts: 34 Joined: Fri Jul 09, 2004 3:35 am
Post
by Nucleus » Tue Jul 26, 2005 5:11 pm
ban (channel ban) and then kick. Thanks
Merk0r
Voice
Posts: 3 Joined: Wed Jul 27, 2005 12:33 pm
Post
by Merk0r » Wed Jul 27, 2005 12:36 pm
That's all wrong.
Code: Select all
set badwords {
"badword"
"badword1"
"badword2"
"badword3"
"etc"
}
bind pubm - * pub:badword
proc pub:badword {nick host hand chan text} {
global badwords
if {![matchattr $hand nmo|nmof]} {
foreach badword $badwords {
if {[string match *$badword* $text]} {
putserv "KICK $chan $nick :You are not allowed to say $badword"
break
}
}
}
}
Dizzle
Op
Posts: 109 Joined: Thu Apr 28, 2005 11:21 am
Contact:
Post
by Dizzle » Wed Jul 27, 2005 2:15 pm
Code: Select all
set banreason "Used a badword"
set badwords {
"badword"
"badword1"
"badword2"
"badword3"
"etc"
}
bind pubm - * pub:badword
proc pub:badword {nick host hand chan text} {
global badwords banreason
if {![matchattr $hand nmo|nmof]} {
foreach badword $badwords {
if {[string match *$badword* $text]} {
putserv "KICK $chan $nick :You are not allowed to say $badword"
set ban *!*[string tolower [string range $uhost [string first @ $uhost] end]]
newchanban $chan $ban BadWord $banreason 15
}
}
}
}
That with a channelban, its ban like *!*@user.domain.com
What's this real life ppl keep talking about ??? And where can I download it ???
Merk0r
Voice
Posts: 3 Joined: Wed Jul 27, 2005 12:33 pm
Post
by Merk0r » Wed Jul 27, 2005 2:23 pm
Code: Select all
set banreason "Badword was detected in your text"
set bantime "15"
set badwords {
"badword"
"badword1"
"badword2"
"badword3"
"etc"
}
bind pubm - * pub:badword
proc pub:badword {nick host hand chan text} {
global badwords banreason bantime
if {![matchattr $hand nmo|nmof]} {
foreach badword $badwords {
if {[string match *$badword* $text]} {
putserv "KICK $chan $nick :You are not allowed to say $badword"
newchanban $chan *![string map ~ * $host] BadWord $banreason $bantime none
}
}
}
}