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 

Mute Script for Typing too much

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
sutkida
Voice


Joined: 19 Nov 2008
Posts: 12

PostPosted: Wed Nov 19, 2008 12:16 pm    Post subject: Mute Script for Typing too much Reply with quote

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


Joined: 19 Nov 2008
Posts: 12

PostPosted: Thu Nov 20, 2008 8:13 am    Post subject: Reply with quote

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.. Crying or Very sad A little help please..
Back to top
View user's profile Send private message Yahoo Messenger
ultralord
Master


Joined: 06 Nov 2006
Posts: 255

PostPosted: Thu Nov 20, 2008 8:23 am    Post subject: Reply with quote

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


Joined: 19 Nov 2008
Posts: 12

PostPosted: Thu Nov 20, 2008 8:57 am    Post subject: Reply with quote

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.. Sad
Back to top
View user's profile Send private message Yahoo Messenger
ultralord
Master


Joined: 06 Nov 2006
Posts: 255

PostPosted: Thu Nov 20, 2008 9:00 am    Post subject: Reply with quote

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

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.
Back to top
View user's profile Send private message
sutkida
Voice


Joined: 19 Nov 2008
Posts: 12

PostPosted: Thu Nov 20, 2008 9:15 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
ultralord
Master


Joined: 06 Nov 2006
Posts: 255

PostPosted: Thu Nov 20, 2008 12:49 pm    Post subject: Reply with quote

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


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Nov 20, 2008 1:22 pm    Post subject: Reply with quote

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


Joined: 19 Nov 2008
Posts: 12

PostPosted: Thu Nov 20, 2008 2:36 pm    Post subject: Reply with quote

It's not working. Sad 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
View user's profile Send private message Yahoo Messenger
game_over
Voice


Joined: 26 Apr 2007
Posts: 29

PostPosted: Fri Nov 21, 2008 8:56 am    Post subject: Reply with quote

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


Joined: 15 Apr 2006
Posts: 36
Location: Trois-Rivières, Qc

PostPosted: Fri Nov 21, 2008 1:05 pm    Post subject: Reply with quote

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
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
Page 1 of 1

 
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