| View previous topic :: View next topic |
| Author |
Message |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Fri Jan 08, 2021 12:13 pm Post subject: anti mass highlight per stored host |
|
|
i took this small code from here http://forum.egghelp.org/viewtopic.php?p=71356 on the forum to tackle mass highlight abuse
exept it only seems to work if triggered by 1 user at a time if more than like 10 or more users type mass highlights of nicks it it doesnt seem to trigger:
| Code: |
bind PUBM -|- * check:hilight
proc check:hilight {nick host h chan arg} {
set arg [split $arg];
set hits 0;
foreach piece $arg {
if {[onchan $piece $chan]} {
incr hits;
}
}
if {$hits >= 5} {
putquick "MODE $chan +b [maskhost $host 2]"
putquick "KICK $chan $nick :Problem solved."
}
}
|
i wonder how this could be edited to check per host of nicks that triggered it
to make sure it triggers no matter how much nicks triggered it
thanks in advance. |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Fri Jan 08, 2021 5:34 pm Post subject: |
|
|
Nothing in the above code would cause the script to "only work if triggered by 1 user at a time"
It processes each line of text to the channel as if nothing happened before or after it:) _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Fri Jan 08, 2021 6:25 pm Post subject: |
|
|
| Hm ok i stress tested it and it seemed to set only certain bans not on all nicks that triggered it and if set by like 30 nicks or more it does nothing at all |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Sat Jan 09, 2021 10:22 am Post subject: |
|
|
i did a test and it didnt trigger the tcl at all
https://pastebin.com/bu11Kqpc
i tested with 30 nicks and none triggered the tcl
i used pushmode to make sure modes gets compressed to set all ban modes
| Code: |
proc check:mass-highlight {nick host hand chan text} {
if {[isatleasthalfopX8ZERO $nick $chan]} { return 0 }
set text [split $text];
set hits 0;
foreach piece $text {
if {[onchan $piece $chan]} {
incr hits;
}
}
if {$hits >= 5} {
if {[isvoice $nick $chan]} { pushmode2 $chan -v $nick }
pushmode $chan +b m:[maskhost $host 2]
}
}
|
|
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Sat Jan 09, 2021 10:55 am Post subject: |
|
|
| tested few times again and it seemed ok thanks SpiKe^^ |
|
| Back to top |
|
 |
|