Code: Select all
.tell nick some random text flood
.tell nick some random text flooding
.tell nick some random text flood
.tell nick some random text flooding
If anyone could please write me this code, I would be grateful.
Code: Select all
.tell nick some random text flood
.tell nick some random text flooding
.tell nick some random text flood
.tell nick some random text flooding
Code: Select all
bind pubm * "% .tell*" Repeated:Static-Text
set chantexttrigger "4:30"
proc Repeated:Static-Text {nick uhost hand chan text} {
if {[matchattr $hand of|of $chan] || [isop $nick $chan] || [ishalfop $nick $chan] || [isbotnick $nick]} { return 0 }
global chantexttrigger chantextflood
set text [regsub -all -- {\s{2,}} [string trim [stripcodes * $text]] { }]
set user $nick:$chan
if {![info exists chantextflood($user)]} { set chantextflood($user) 0 ; utimer [lindex [split $chantexttrigger :] 1] [list text:flood:list $user] }
if {[incr chantextflood($user)] >= [lindex [split $chantexttrigger :] 0]} {
if {[isvoice $nick $chan]} { pushmode $chan -v $nick }
if {[string match -nocase "*@*irccloud*" $uhost]} {
set ident [string trimleft [lindex [split $uhost @] 0] "~"]
set xbmaskx [string map {sid id uid id} $ident]
set bmask m:*!*$xbmaskx@*
pushmode $chan +b $bmask
} else {
set bmask "m:*!*@[lindex [split $uhost "@"] 1]"
pushmode $chan +b $bmask
}
if {[info exists chantextflood($user)]} { unset chantextflood($user) }
}
flushmode $chan
}
proc text:flood:list u {
global chantextflood
if {[info exists chantextflood($u)]} { incr chantextflood($u) -1 }
}
Are you dead set on using a kick or ban? Because you have reminded me of something else, that may be suitable.Hi, I am looking for a repeat kick script that would either mute, kick or ban a user from the channel for repeating more than 4 times in 30 seconds like this:
I'm curious about this.I am using this .tell command in channel so users can send offline messages to other users ...
Hi simo, thank you, the script seems to be working. Is it also possible to add a timer of when the mute ban expires?simo wrote: ↑Tue Apr 02, 2024 10:17 amCode: Select all
bind pubm * "% .tell*" Repeated:Static-Text set chantexttrigger "4:30" proc Repeated:Static-Text {nick uhost hand chan text} { if {[matchattr $hand of|of $chan] || [isop $nick $chan] || [ishalfop $nick $chan] || [isbotnick $nick]} { return 0 } global chantexttrigger chantextflood set text [regsub -all -- {\s{2,}} [string trim [stripcodes * $text]] { }] set user $nick:$chan if {![info exists chantextflood($user)]} { set chantextflood($user) 0 ; utimer [lindex [split $chantexttrigger :] 1] [list text:flood:list $user] } if {[incr chantextflood($user)] >= [lindex [split $chantexttrigger :] 0]} { if {[isvoice $nick $chan]} { pushmode $chan -v $nick } if {[string match -nocase "*@*irccloud*" $uhost]} { set ident [string trimleft [lindex [split $uhost @] 0] "~"] set xbmaskx [string map {sid id uid id} $ident] set bmask m:*!*$xbmaskx@* pushmode $chan +b $bmask } else { set bmask "m:*!*@[lindex [split $uhost "@"] 1]" pushmode $chan +b $bmask } if {[info exists chantextflood($user)]} { unset chantextflood($user) } } flushmode $chan } proc text:flood:list u { global chantextflood if {[info exists chantextflood($u)]} { incr chantextflood($u) -1 } }
Hi willy, yes, but, a mute ban would also be nice to set with a option of timer of when the mute ban would be removed.
Code: Select all
bind pubm * "% .tell*" Repeated:Static-Text
set chantexttrigger "4:30"
proc Repeated:Static-Text {nick uhost hand chan text} {
if {[matchattr $hand of|of $chan] || [isop $nick $chan] || [ishalfop $nick $chan] || [isbotnick $nick]} { return 0 }
global chantexttrigger chantextflood
set text [regsub -all -- {\s{2,}} [string trim [stripcodes * $text]] { }]
set user $nick:$chan
if {![info exists chantextflood($user)]} { set chantextflood($user) 0 ; utimer [lindex [split $chantexttrigger :] 1] [list text:flood:list $user] }
if {[incr chantextflood($user)] >= [lindex [split $chantexttrigger :] 0]} {
if {[isvoice $nick $chan]} { pushmode $chan -v $nick }
if {[string match -nocase "*@*irccloud*" $uhost]} {
set ident [string trimleft [lindex [split $uhost @] 0] "~"]
set xbmaskx [string map {sid id uid id} $ident]
set bmask m:*!*$xbmaskx@*
if {![ischanban $bmask $chan]} { pushmode $chan +b $bmask ; timer 10 [list timed:ban $chan $bmask]}
} else {
set bmask "m:*!*@[lindex [split $uhost "@"] 1]"
if {![ischanban $bmask $chan]} { pushmode $chan +b $bmask ; timer 10 [list timed:ban $chan $bmask]}
}
if {[info exists chantextflood($user)]} { unset chantextflood($user) }
}
flushmode $chan
}
proc timed:ban {chan banmask} {
if {[ischanban $banmask $chan]} {
pushmode $chan -b $banmask
} else { putlog "$banmask is already removed from $chan" }
}
proc text:flood:list u {
global chantextflood
if {[info exists chantextflood($u)]} { incr chantextflood($u) -1 }
}