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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
simo
Revered One
Posts: 1079 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Fri Jan 08, 2021 12:13 pm
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: Select all
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.
SpiKe^^
Owner
Posts: 831 Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:
Post
by SpiKe^^ » Fri Jan 08, 2021 5:34 pm
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:)
simo
Revered One
Posts: 1079 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Fri Jan 08, 2021 6:25 pm
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
simo
Revered One
Posts: 1079 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Sat Jan 09, 2021 10:22 am
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: Select all
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]
}
}
simo
Revered One
Posts: 1079 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Sat Jan 09, 2021 10:55 am
tested few times again and it seemed ok thanks SpiKe^^