| View previous topic :: View next topic |
| Author |
Message |
sutkida Voice
Joined: 19 Nov 2008 Posts: 12
|
Posted: Wed Nov 19, 2008 12:16 pm Post subject: Mute Script for Typing too much |
|
|
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:
| Quote: | <[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. |
|
| Back to top |
|
 |
sutkida Voice
Joined: 19 Nov 2008 Posts: 12
|
Posted: Thu Nov 20, 2008 8:13 am Post subject: |
|
|
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.. A little help please.. |
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Thu Nov 20, 2008 8:23 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
sutkida Voice
Joined: 19 Nov 2008 Posts: 12
|
Posted: Thu Nov 20, 2008 8:57 am Post subject: |
|
|
| 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..  |
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
|
| Back to top |
|
 |
sutkida Voice
Joined: 19 Nov 2008 Posts: 12
|
Posted: Thu Nov 20, 2008 9:15 am Post subject: |
|
|
| Code: | 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. |
|
| Back to top |
|
 |
ultralord Master

Joined: 06 Nov 2006 Posts: 255
|
Posted: Thu Nov 20, 2008 12:49 pm Post subject: |
|
|
| Code: | 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 |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Thu Nov 20, 2008 1:22 pm Post subject: |
|
|
Just remember to set your bot not to enforce bans on your channel, or it will kick nevertheless. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
sutkida Voice
Joined: 19 Nov 2008 Posts: 12
|
Posted: Thu Nov 20, 2008 2:36 pm Post subject: |
|
|
It's not working. how about this code: | Code: | # 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) |
|
| Back to top |
|
 |
game_over Voice
Joined: 26 Apr 2007 Posts: 29
|
Posted: Fri Nov 21, 2008 8:56 am Post subject: |
|
|
if write script whit any timers you wrong or make bugs.
use uptime to bot like variable. See this to exaple:
| Code: | 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 |
|
| Back to top |
|
 |
DarkRaptor Voice

Joined: 15 Apr 2006 Posts: 36 Location: Trois-Rivières, Qc
|
Posted: Fri Nov 21, 2008 1:05 pm Post subject: |
|
|
| Code: |
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: |
.chanset #yourchan flood-chan 6:2
|
Not tested _________________ DarkRaptor @ irc.undernet.org |
|
| Back to top |
|
 |
|