# This script is designed to prevent clones from flooding the shit out of us # It works with epic4, and may work with bitchx, but I won't test that. # It won't work with ircII, unfortunatly, as I use epic-only functions. # Variables assign hackpass yourmom assign limitchannel #subgenius @ ::LIMITINCREASE = 10 @ ::TIMEFORLOOP = 60 # The kiddies love this on PUBLIC "% % !LIST*" { mode $1 +b $0 timer 30 mode $1 -b $0 kick $1 $0 Does this look like #warez to you? } # The on join on 329 "*" { @ ::CHANNEL_SIZE = [$numwords($chanusers())] @ ::CHANNEL_LIMIT = [$CHANNEL_SIZE] + [$LIMITINCREASE] show_limit mode $C $hackpass } on JOIN "*" { if ( [$0] != n ) { @ ::CHANNEL_SIZE = [$numwords($chanusers())] show_limit if ( CHANNEL_SIZE == CHANNEL_LIMIT ) { mode $C +m say WARNING: Possible clone flood. Channel moderated as protection. fe ( $chops() ) bar { notice $bar [WALLOP/$C] If this is not a flood, /msg $N NOCLONE } } if ( CHANNEL_SIZE > CHANNEL_LIMIT ) { # Must be the other end of a split. @ ::CHANNEL_LIMIT = CHANNEL_LIMIT + 2 } show_limit } } # The on leave on LEAVE "*" { @ ::CHANNEL_SIZE = [$numwords($chanusers())] show_limit } # The on signoff on SIGNOFF "*" { @ ::CHANNEL_SIZE = [$numwords($chanusers())] show_limit } # The on msg. This function is hooked whenever someone messages me # "NOCLONES". It will verify the person is an op, then increase the # limit by 3. on -msg "% NOCLONE*" { if ( [$ischanop($0)] ) { notice $0 Increasing channel limit. You should unmoderate the channel manually, to prevent abuse. You can do this with: /mode $C -m @ ::CHANNEL_LIMIT = CHANNEL_LIMIT + 5 mode $C +l $CHANNEL_LIMIT }{ notice $0 Sorry, you aren't a chanel operator } } # This should get run every 30 seconds, and will handle changing the limit. # If the channel has hit the limit, assume we're being flooded and don't # increase the limit. alias limit_loop { @ ::CHANNEL_SIZE = [$numwords($chanusers())] if ( CHANNEL_SIZE < CHANNEL_LIMIT ) { @ ::CHANNEL_LIMIT = CHANNEL_SIZE + LIMITINCREASE if ( CHANNEL_LIMIT != [$rightw(1 $chanmode())] ) { mode $C +l $CHANNEL_LIMIT } }{ # Hmm, this state should theorectically never happen. Tell skully # about it. msg skully ERROR: Channel size: $CHANNEL_SIZE Channel limit: $CHANNEL_LIMIT $stime($time()) # Fix it, for now @ ::CHANNEL_SIZE = [$numwords($chanusers())] @ ::CHANNEL_LIMIT = [$CHANNEL_SIZE] + [$LIMITINCREASE] show_limit } timer 60 limit_loop } alias show_limit { xecho -banner CHANNEL SIZE: $CHANNEL_SIZE xecho -banner CHANNEL LIMIT: $CHANNEL_LIMIT } eval join $limitchannel wait limit_loop