egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Hi, need help to edit script
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
g0m3z
Voice


Joined: 30 Nov 2007
Posts: 11

PostPosted: Sun Jan 13, 2008 11:58 am    Post subject: Hi, need help to edit script Reply with quote

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
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Jan 13, 2008 12:44 pm    Post subject: Reply with quote

Plenty of bad word scripts in the archive.
Back to top
View user's profile Send private message
g0m3z
Voice


Joined: 30 Nov 2007
Posts: 11

PostPosted: Sun Jan 13, 2008 12:47 pm    Post subject: Reply with quote

I've looked in it, but can't find what i need.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Jan 13, 2008 2:14 pm    Post subject: Reply with quote

You didn't search well because you're not requesting anything new.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
g0m3z
Voice


Joined: 30 Nov 2007
Posts: 11

PostPosted: Sun Jan 13, 2008 2:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
g0m3z
Voice


Joined: 30 Nov 2007
Posts: 11

PostPosted: Sun Jan 13, 2008 3:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
Callisto
Halfop


Joined: 13 Mar 2005
Posts: 86

PostPosted: Sun Jan 13, 2008 3:56 pm    Post subject: Reply with quote

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_archive.tcl?mode=download&id=1019
Back to top
View user's profile Send private message
g0m3z
Voice


Joined: 30 Nov 2007
Posts: 11

PostPosted: Sun Jan 13, 2008 4:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
Callisto
Halfop


Joined: 13 Mar 2005
Posts: 86

PostPosted: Sun Jan 13, 2008 4:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
g0m3z
Voice


Joined: 30 Nov 2007
Posts: 11

PostPosted: Sun Jan 13, 2008 4:37 pm    Post subject: Reply with quote

Sorry have not seen the ban time.
Will try to edit then, to fit it to my needs.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Jan 13, 2008 8:07 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
g0m3z
Voice


Joined: 30 Nov 2007
Posts: 11

PostPosted: Sun Jan 13, 2008 9:01 pm    Post subject: Reply with quote

Thanks a lot. That really helped.
Any ideas how to make it to remove the ban in 10 minutes?
Back to top
View user's profile Send private message
g0m3z
Voice


Joined: 30 Nov 2007
Posts: 11

PostPosted: Sun Jan 13, 2008 9:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Sun Jan 13, 2008 9:43 pm    Post subject: Reply with quote

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' Rolling Eyes
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
g0m3z
Voice


Joined: 30 Nov 2007
Posts: 11

PostPosted: Sun Jan 13, 2008 9:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber