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.

Mute Script for Typing too much

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
s
sutkida
Voice
Posts: 12
Joined: Wed Nov 19, 2008 6:06 am

Mute Script for Typing too much

Post by sutkida »

Hi! I've been around already searching for this kind of script but wasn't able to find it. Anyway,here's how this script will work:
<[nick]> Line1
<[nick]> Line2
<[nick]> Line3
<[nick]> Line4
<[nick]> Line5
<[nick]> Line6
* Bot sets mode: +b [nick]!*ident@some.host.com
<Bot> We need to restrain you for 2minutes (6lines in 2seconds)
As you can see the nick has typed words/phrases 6 lines in 2 seconds and that puts him in a mute state for 2 mins. And he will be unmuted after 2 mins. I don't want a script that will kick/ban any user that has violated a flood rule. I just want him/her to be muted.
Hoping for a kind consideration on my request. TYIA.
s
sutkida
Voice
Posts: 12
Joined: Wed Nov 19, 2008 6:06 am

Post by sutkida »

still waiting for someone with a nice heart to make me this kind of script.And you know I'm a noob when it comes to TCLs.. :cry: A little help please..
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

use Search on main page.. you can use many tcl with anti-flood system and you can edit to make only ban and not kick or something.
s
sutkida
Voice
Posts: 12
Joined: Wed Nov 19, 2008 6:06 am

Post by sutkida »

ultralord wrote:use Search on main page.. you can use many tcl with anti-flood system and you can edit to make only ban and not kick or something.
As you can see, I'm no good in TCL..And I'm too noob for it..I can't edit it by myself that's why I'm requesting here.. :(
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

yes but thats the reason why we have search to search for scripts anyway :P

http://www.egghelp.org/tclhtml/3478-4-0-0-1-flood.htm

you can use the all protection tcl but you must edit it with your custom settings.
s
sutkida
Voice
Posts: 12
Joined: Wed Nov 19, 2008 6:06 am

Post by sutkida »

Code: Select all

set textftrigger 5:2 

bind pubm - * textf 
bind ctcp - ACTION actionf 

proc textf {nick uhost hand chan arg} { 
global textftrigger textf 
if {![info exists textf([set f [string tolower $uhost:$chan]])]} { 
set textf($f) 0 
} 
utimer [lindex [split $textftrigger :] 1] [list incr textf($f) -1] 
if {[incr textf($f)] >= [lindex [split $textftrigger :] 0]} { 
pushmode $chan +b *!*@[lindex [split $uhost @] 1] 
kick $chan $nick "Text flood detected" 
unset textf($f) 
} 
} 

proc actionf {nick uhost hand chan kw arg} { 
if {[isbotnick [lindex [split $chan "@"] 0]] || [lindex [split $chan "@"] 1] != ""} {return 0} 
textf $nick $uhost $chan $chan $arg 
}
Ok..Found this code somewhere in the thread..Can someone kindly edit this please? The bot should not kick the user but just ban him for 2 minutes and that ban will place him in mute state where he cannot send message to the main channel.
User avatar
ultralord
Master
Posts: 255
Joined: Mon Nov 06, 2006 6:52 pm

Post by ultralord »

Code: Select all

set textftrigger 5:2

bind pubm - * textf
bind ctcp - ACTION actionf

proc textf {nick uhost hand chan arg} {
global textftrigger textf time
if {![info exists textf([set f [string tolower $uhost:$chan]])]} {
set textf($f) 0
}
utimer [lindex [split $textftrigger :] 1] [list incr textf($f) -1]
if {[incr textf($f)] >= [lindex [split $textftrigger :] 0]} {
pushmode $chan +b *!*@[lindex [split $uhost @] 1]
unset textf($f)
}
}

proc actionf {nick uhost hand chan kw arg} {
if {[isbotnick [lindex [split $chan "@"] 0]] || [lindex [split $chan "@"] 1] != ""} {return 0}
textf $nick $uhost $chan $chan $arg
} 

Not tested <

tell us if works
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Just remember to set your bot not to enforce bans on your channel, or it will kick nevertheless.
NML_375
s
sutkida
Voice
Posts: 12
Joined: Wed Nov 19, 2008 6:06 am

Post by sutkida »

It's not working. :( how about this code:

Code: Select all

# actban variable is setting ban time 
# use 0 to make perm 
set actban 2

bind pubm - "*" ban:act 

proc ban:act { nick uhost hand dest key text } { 
#uncomment next line to exclude chanops 
#if [!isop $nick] return 
newban *!*$uhost $::botnick action_ban $::actban 
} 
This works but need some additional info like it will only ban for 2 minutes then unban after 2 minutes. It should detect the 6 lines in 2 seconds messages/phrases the user has typed. And it should also display a message on the channel like:
<Bot> We need to restrain you for 2minutes (6lines in 2seconds)
g
game_over
Voice
Posts: 29
Joined: Thu Apr 26, 2007 7:22 am

Post by game_over »

if write script whit any timers you wrong or make bugs.

use uptime to bot like variable. See this to exaple:

Code: Select all

set time ""
set counter 1
set floodnick ""
pind pubm - * flood:pub

proc flood:pub {nick uhost hand chan text} {
  global time counter floodnick
  if {[expr [clock seconds]-$::uptime]<=$time && $nick == $floodnick} {
      incr counter 1; set floodnick $nick
  if {$counter > 5} {newban $nick!*$uhost $::botnick ban 2; set counter 0}
  }
   set time [expr [expr [clock seconds]-$::uptime] + 2]; set counter 1; set floodnick $nick 
}
Last edited by game_over on Mon Nov 24, 2008 5:13 am, edited 1 time in total.
User avatar
DarkRaptor
Voice
Posts: 36
Joined: Sat Apr 15, 2006 2:39 am
Location: Trois-Rivières, Qc

Post by DarkRaptor »

Code: Select all

bind FLUD - chan Flood:Chan

proc Flood:Chan { nick host hand type chan } {
   pushmode $chan +b *!*@[lindex [split $host "@"] 1]
   utimer 120 [list pushmode $chan -b *!*@[lindex [split $host "@"] 1]
}
You can control this with .chanset

Code: Select all

.chanset #yourchan flood-chan 6:2


Not tested
DarkRaptor @ irc.undernet.org
Post Reply