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.

Hi, need help to edit script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
g
g0m3z
Voice
Posts: 11
Joined: Fri Nov 30, 2007 9:34 pm

Hi, need help to edit script

Post by g0m3z »

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.
# 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.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Plenty of bad word scripts in the archive.
g
g0m3z
Voice
Posts: 11
Joined: Fri Nov 30, 2007 9:34 pm

Post by g0m3z »

I've looked in it, but can't find what i need.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You didn't search well because you're not requesting anything new.
g
g0m3z
Voice
Posts: 11
Joined: Fri Nov 30, 2007 9:34 pm

Post by g0m3z »

Yes there is a lot of badwords scripts, but they all are huge and bulky. I just need it simple and tiny.
g
g0m3z
Voice
Posts: 11
Joined: Fri Nov 30, 2007 9:34 pm

Post by g0m3z »

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: Select all

# 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]  }
  }
}
C
Callisto
Halfop
Posts: 86
Joined: Sun Mar 13, 2005 11:04 am

Post by Callisto »

This is the one I like to use. It is easy to edit and customise to your needs. Thanks awyeah it works great.
http://www.egghelp.org/cgi-bin/tcl_arch ... ad&id=1019
g
g0m3z
Voice
Posts: 11
Joined: Fri Nov 30, 2007 9:34 pm

Post by g0m3z »

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.
C
Callisto
Halfop
Posts: 86
Joined: Sun Mar 13, 2005 11:04 am

Post by Callisto »

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 ?
#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.
g
g0m3z
Voice
Posts: 11
Joined: Fri Nov 30, 2007 9:34 pm

Post by g0m3z »

Sorry have not seen the ban time.
Will try to edit then, to fit it to my needs.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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: Select all

# 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: Select all

if [isop $nick] return
with

Code: Select all

if {[isop $nick] || [matchattr $hand f|f $dest]} { return 0 }
g
g0m3z
Voice
Posts: 11
Joined: Fri Nov 30, 2007 9:34 pm

Post by g0m3z »

Thanks a lot. That really helped.
Any ideas how to make it to remove the ban in 10 minutes?
g
g0m3z
Voice
Posts: 11
Joined: Fri Nov 30, 2007 9:34 pm

Post by g0m3z »

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.
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

Callisto wrote:Yes it does offer ban removal see this ?
#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' :roll:
g
g0m3z
Voice
Posts: 11
Joined: Fri Nov 30, 2007 9:34 pm

Post by g0m3z »

Thanks a lot, but i'm currently working on:

Code: Select all

# 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]  }  
  } 
} 
Post Reply