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.

anti mass highlight per stored host

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
s
simo
Revered One
Posts: 1078
Joined: Sun Mar 22, 2015 2:41 pm

anti mass highlight per stored host

Post by simo »

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.
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

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
.
s
simo
Revered One
Posts: 1078
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

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
s
simo
Revered One
Posts: 1078
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

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]
  }
}
s
simo
Revered One
Posts: 1078
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

tested few times again and it seemed ok thanks SpiKe^^
Post Reply