| View previous topic :: View next topic |
| Author |
Message |
i.m.offline Halfop
Joined: 02 Mar 2006 Posts: 74
|
Posted: Sun Sep 02, 2007 9:20 am Post subject: Warn/kick/ban Script!! |
|
|
Hello Friends,
can some1 suggest me any script which warns/kicks/bans on specified words. Tried searching around but couldn't find any.
Thanks in advance. |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
| Back to top |
|
 |
i.m.offline Halfop
Joined: 02 Mar 2006 Posts: 74
|
Posted: Sun Sep 02, 2007 9:40 am Post subject: |
|
|
| Sir_Fz wrote: | | AllProtection can do that. |
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.
Thanks for your response. Thanks |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sun Sep 02, 2007 7:43 pm Post subject: |
|
|
Simply translate and edit the text output yourself; it's quite simple and needs to be done carefully. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
i.m.offline Halfop
Joined: 02 Mar 2006 Posts: 74
|
Posted: Tue Sep 04, 2007 1:20 am Post subject: Thanks |
|
|
| Thanks for the response mate, I was unable to find the clue how to even start over and ain't so good at it so requested for it :s |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue Sep 04, 2007 8:59 am Post subject: |
|
|
There were similar requests before in this forum. Try to search for warn/kick examples. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
i.m.offline Halfop
Joined: 02 Mar 2006 Posts: 74
|
Posted: Tue Sep 04, 2007 9:14 am Post subject: |
|
|
Thanks again for taking your precious time to reply
I couldn't find any similar post than myself posted earlier here ---> http://forum.egghelp.org/viewtopic.php?t=12595&highlight=warn+kick
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  |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Tue Sep 04, 2007 11:20 am Post subject: Re: Warn/kick/ban Script!! |
|
|
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 the misunderstood |
|
| Back to top |
|
 |
i.m.offline Halfop
Joined: 02 Mar 2006 Posts: 74
|
Posted: Wed Sep 05, 2007 1:45 am Post subject: Re: Warn/kick/ban Script!! |
|
|
| 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. |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Wed Sep 05, 2007 4:47 am Post subject: |
|
|
Its easy enough:
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. _________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Last edited by awyeah on Wed Sep 05, 2007 4:56 am; edited 1 time in total |
|
| Back to top |
|
 |
i.m.offline Halfop
Joined: 02 Mar 2006 Posts: 74
|
Posted: Wed Sep 05, 2007 4:51 am Post subject: |
|
|
| awyeah wrote: | Its easy enough:
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  |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Wed Sep 05, 2007 4:55 am Post subject: |
|
|
| i.m.offline wrote: | | awyeah wrote: | Its easy enough:
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.
================================== |
|
| Back to top |
|
 |
i.m.offline Halfop
Joined: 02 Mar 2006 Posts: 74
|
Posted: Wed Sep 05, 2007 5:10 am Post subject: |
|
|
| awyeah wrote: | | i.m.offline wrote: | | awyeah wrote: | Its easy enough:
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 |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed Sep 05, 2007 11:51 am Post subject: |
|
|
This should do it:
| Code: | 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  _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
i.m.offline Halfop
Joined: 02 Mar 2006 Posts: 74
|
Posted: Thu Sep 06, 2007 1:15 am Post subject: |
|
|
| Sir_Fz wrote: | This should do it:
| Code: | 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. |
|
| Back to top |
|
 |
|