| View previous topic :: View next topic |
| Author |
Message |
g0m3z Voice
Joined: 30 Nov 2007 Posts: 11
|
Posted: Sun Jan 13, 2008 11:58 am Post subject: Hi, need help to edit script |
|
|
Hi,
I been wandering around to find a script that suits me.
I need the bot to ban users who use badwords in their actions.
The ban should be in this mask ~q:*!*@* and the bot should automatically remove it in 10 minutes. Also it would be good to use badwords.txt file to always be able to add more words as needed to this protection.
I've got this code and just have no luck achieving the result i need.
| Quote: |
# kick after x slaps in y seconds
set slaplimit 1:1
bind ctcp - ACTION slap:prot
proc slap:prot {nick uhost hand chan kw arg} {
if {![validchan $chan]||[matchattr $hand +fmo|+fmo $chan]} {return 0}
foreach {o s} [split $::slaplimit :] {break}
if {[string match -nocase "gth*" $arg]&&[fld:slap $uhost:$chan $s $o]} {
pushmode $chan +b ~q:*!*@[lindex [split $uhost @] 1]
}
}
proc fld:slap {id s o} {
global slappers
if {![info exists slappers($id)]} {
set slappers($id) 0
utimer $s [list unset slappers($id)]
}
expr {[incr slappers($id)] >= $o}
}
|
This script has an actions limit which i don't need. It does not have a badwords.txt list. Is it possible implement that?
Would appreciate anyones input in this. |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Sun Jan 13, 2008 12:44 pm Post subject: |
|
|
| Plenty of bad word scripts in the archive. |
|
| Back to top |
|
 |
g0m3z Voice
Joined: 30 Nov 2007 Posts: 11
|
Posted: Sun Jan 13, 2008 12:47 pm Post subject: |
|
|
| I've looked in it, but can't find what i need. |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Jan 13, 2008 2:14 pm Post subject: |
|
|
You didn't search well because you're not requesting anything new. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
g0m3z Voice
Joined: 30 Nov 2007 Posts: 11
|
Posted: Sun Jan 13, 2008 2:27 pm Post subject: |
|
|
| Yes there is a lot of badwords scripts, but they all are huge and bulky. I just need it simple and tiny. |
|
| Back to top |
|
 |
g0m3z Voice
Joined: 30 Nov 2007 Posts: 11
|
Posted: Sun Jan 13, 2008 3:55 pm Post subject: |
|
|
Hi,
I've found this one, but it bans everyone, even if the user has +f flag on the bot and it does not remove bans from the channel after the ban expires...
How do I change it, not to ban users that have +f flag?
| Code: |
# actban variable is setting ban time in minutes
# use 0 to make perm
set actban 10
bind ctcp - ACTION ban:act
proc ban:act { nick uhost hand dest key text } {
#uncomment next line to exclude chanops
if [isop $nick] return
newban ~q:*!$uhost $::botnick action_ban $::actban
foreach chan [channels] {
if [onchan $nick $chan] { pushmode $chan +b ~q:*!*@[lindex [split $uhost @] 1] }
}
} |
|
|
| Back to top |
|
 |
Callisto Halfop
Joined: 13 Mar 2005 Posts: 86
|
|
| Back to top |
|
 |
g0m3z Voice
Joined: 30 Nov 2007 Posts: 11
|
Posted: Sun Jan 13, 2008 4:17 pm Post subject: |
|
|
| Yeah this is a really big badwords engine, you can set load of things. But it does not offer ban removal after set time, bans cannot include ~q:*!*@* and there is no file.txt where I would be able to edit them badwords easily. |
|
| Back to top |
|
 |
Callisto Halfop
Joined: 13 Mar 2005 Posts: 86
|
Posted: Sun Jan 13, 2008 4:33 pm Post subject: |
|
|
| g0m3z wrote: | | Yeah this is a really big badwords engine, you can set load of things. But it does not offer ban removal after set time, bans cannot include ~q:*!*@* and there is no file.txt where I would be able to edit them badwords easily. |
Yes it does offer ban removal see this ? | Quote: | #Set the amount of time in minutes to ban the user for. (in mins)
#(By default if you do not set a value the script will assume it to be 60 minutes)
set swearbantime "30" |
As for the easy to edit list, Maybe awyeah can help you with this? It has never been an issue as most of the bad words are covered out of the box. Easy enough to edit though. |
|
| Back to top |
|
 |
g0m3z Voice
Joined: 30 Nov 2007 Posts: 11
|
Posted: Sun Jan 13, 2008 4:37 pm Post subject: |
|
|
Sorry have not seen the ban time.
Will try to edit then, to fit it to my needs. |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Jan 13, 2008 8:07 pm Post subject: |
|
|
| g0m3z wrote: | Hi,
I've found this one, but it bans everyone, even if the user has +f flag on the bot and it does not remove bans from the channel after the ban expires...
How do I change it, not to ban users that have +f flag?
| Code: |
# actban variable is setting ban time in minutes
# use 0 to make perm
set actban 10
bind ctcp - ACTION ban:act
proc ban:act { nick uhost hand dest key text } {
#uncomment next line to exclude chanops
if [isop $nick] return
newban ~q:*!$uhost $::botnick action_ban $::actban
foreach chan [channels] {
if [onchan $nick $chan] { pushmode $chan +b ~q:*!*@[lindex [split $uhost @] 1] }
}
} |
|
Replace
| Code: | | if [isop $nick] return |
with
| Code: | | if {[isop $nick] || [matchattr $hand f|f $dest]} { return 0 } |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
g0m3z Voice
Joined: 30 Nov 2007 Posts: 11
|
Posted: Sun Jan 13, 2008 9:01 pm Post subject: |
|
|
Thanks a lot. That really helped.
Any ideas how to make it to remove the ban in 10 minutes? |
|
| Back to top |
|
 |
g0m3z Voice
Joined: 30 Nov 2007 Posts: 11
|
Posted: Sun Jan 13, 2008 9:43 pm Post subject: |
|
|
Sorted the ban time with a .chanser #channel ban-time 10. Works like a charm. Can anyone give me a hand on badwords.txt file, how to implement it into the script?
Appreciate everyones input. |
|
| Back to top |
|
 |
YooHoo Owner

Joined: 13 Feb 2003 Posts: 939 Location: Redwood Coast
|
Posted: Sun Jan 13, 2008 9:43 pm Post subject: |
|
|
| Callisto wrote: | Yes it does offer ban removal see this ? | Quote: | #Set the amount of time in minutes to ban the user for. (in mins)
#(By default if you do not set a value the script will assume it to be 60 minutes)
set swearbantime "30" |
| change the '30' to '10'  _________________
Johoho's TCL for beginners
 |
|
| Back to top |
|
 |
g0m3z Voice
Joined: 30 Nov 2007 Posts: 11
|
Posted: Sun Jan 13, 2008 9:49 pm Post subject: |
|
|
Thanks a lot, but i'm currently working on:
| Code: |
# actban variable is setting ban time in minutes
# use 0 to make perm
set actban 10
bind ctcp - ACTION ban:act
proc ban:act { nick uhost hand dest key text } {
#uncomment next line to exclude chanops
if {[isop $nick] || [matchattr $hand f|f $dest]} { return 0 }
newban ~q:*!$uhost $::botnick action_ban $::actban
foreach chan [channels] {
if [onchan $nick $chan] { pushmode $chan +b ~q:*!*@[lindex [split $uhost @] 1] }
}
}
|
|
|
| Back to top |
|
 |
|