Thanks bro, one of the gr8 written script of yours, which I am already using for protection.
apart from it, as our channel is English / Arabic only. I wanted an separate code for w/k/b on specific other language common words to kick/ban with different kick msg & warning so I requested for a separate code.
I followed the suggestion of mavericku
but now I found out there is some error like, when I add word lets say "Kya"
so it triggers even on LuckyAngel, I tried to change string to "* kya *" but then it trigger on that.
Not sure how to get it work right or if there is something I am messing up with
Check out MC_8's badword script, it has exempt words and alot other features. This is probably in the TCL Archive, but heres a direct link to the scripts page on his MC_8's website http://mc.purehype.net/index.tcl?info=Bad+Words. Hope it helps
TCL_no_TK wrote:Check out MC_8's badword script, it has exempt words and alot other features. This is probably in the TCL Archive, but heres a direct link to the scripts page on his MC_8's website http://mc.purehype.net/index.tcl?info=Bad+Words. Hope it helps
Thanks for the reply mate, I will try that. Thanks again
Edited:
I tried working with it but dont find any option to make it work like warn/kick/ban. Somehow it seems so huge code for swear! maybe I m wrong.
Once a swear word is detected from a user, add that nick into an array and say set a value of 1 and warn that user. If that user says another swear word, check the array for that user, if found you check the value of the array, if say 1, means you warned him already, so increment the value to 2 and kick him. If he says another swear word, check the array again for the nick if found, check the value again, if it is 2, then you kick and ban that user. After that remove that nick from the array.
Last edited by awyeah on Wed Sep 05, 2007 4:56 am, edited 1 time in total.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Once a swear word is detected from a user, add that nick into an array and say set a value of 1 and warn that user. If that user says another swear word, check the array for that user, if found you check the value of the array, if say 1, means you warned him already, so increment the value to 2 and kick him. If he says another swear word, check the array again for the nick if found, check the value again, if it is 2, then you kick and ban that user.
Thanks for the advice and guideline Awyeah. M complete noob on tcl so I requested if any1 came across such code
Once a swear word is detected from a user, add that nick into an array and say set a value of 1 and warn that user. If that user says another swear word, check the array for that user, if found you check the value of the array, if say 1, means you warned him already, so increment the value to 2 and kick him. If he says another swear word, check the array again for the nick if found, check the value again, if it is 2, then you kick and ban that user.
Thanks for the advice and guideline Awyeah. M complete noob on tcl so I requested if any1 came across such code
Sorry, I wouldn't have any time to code something like this for you, since I am quite busy with alot of work currently. You can however, request it in the scripts request section and hope someone helps you with it.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Once a swear word is detected from a user, add that nick into an array and say set a value of 1 and warn that user. If that user says another swear word, check the array for that user, if found you check the value of the array, if say 1, means you warned him already, so increment the value to 2 and kick him. If he says another swear word, check the array again for the nick if found, check the value again, if it is 2, then you kick and ban that user.
Thanks for the advice and guideline Awyeah. M complete noob on tcl so I requested if any1 came across such code
Sorry, I wouldn't have any time to code something like this for you, since I am quite busy with alot of work currently. You can however, request it in the scripts request section and hope someone helps you with it.
Thanks a lot for sparing sometime and giving good guideline for that really appreciated.
Ya it is already in script request section, seeking help :s wish me luck haha
set wkb(words) {
*word1*
"word2 *"
"* words"
}
set wkb(time) 60 ; # time in seconds
set wkb(warn) "you've said a bad word...etc"
set wkb(kick) "you've said a bad word...etc"
bind pubm - * warnkickban
proc warnkickban {nick uhost hand chan arg} {
global wkb
set match 0
foreach word $wkb(words) {
if {[string match -nocase $word $arg]} {
set match 1
break
}
}
if {$match} {
set o [throttled $nick:$uhost $wkb(time)]
if {$o == 1} {
puthelp "notice $nick :$wkb(warn)"
} {
putserv "kick $chan $nick :$wkb(kick)"
if {$o > 2} {
putserv "mode $chan +b *!*@[lindex [split $uhost @] 1]"
}
}
}
}
# user's throttled procedure with slight modification
proc throttled {id time} {
global throttled
if {[info exists throttled($id)]} {
incr throttled($id)
} {
set throttled($id) 1
utimer $time [list unset throttled($id)]
}
return $throttled($id)
}
It feels like it's been years since I last wrote something in Tcl
set wkb(words) {
*word1*
"word2 *"
"* words"
}
set wkb(time) 60 ; # time in seconds
set wkb(warn) "you've said a bad word...etc"
set wkb(kick) "you've said a bad word...etc"
bind pubm - * warnkickban
proc warnkickban {nick uhost hand chan arg} {
global wkb
set match 0
foreach word $wkb(words) {
if {[string match -nocase $word $arg]} {
set match 1
break
}
}
if {$match} {
set o [throttled $nick:$uhost $wkb(time)]
if {$o == 1} {
puthelp "notice $nick :$wkb(warn)"
} {
putserv "kick $chan $nick :$wkb(kick)"
if {$o > 2} {
putserv "mode $chan +b *!*@[lindex [split $uhost @] 1]"
}
}
}
}
# user's throttled procedure with slight modification
proc throttled {id time} {
global throttled
if {[info exists throttled($id)]} {
incr throttled($id)
} {
set throttled($id) 1
utimer $time [list unset throttled($id)]
}
return $throttled($id)
}
It feels like it's been years since I last wrote something in Tcl
Thanks a lot bro for the help. I will give it a try.
Just one confusion - it will reset the offence in 60 sec? which means if the user says the bad word after 60 sec, it will again start from 1st level?
Please correct me if am wrong.
And if I understand it right then I will increase the time thanks once again.