mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2005
Posts: 15
D
dtrmp4 Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Feb 2005
Posts: 15
Okay, I asked about this before so you might remember me. Anyways, this is the script:
Code:
 on *:start: {
;if user sends more than %flood.lines in this time ban them
set %flood.unset 10
;if a user sends more than this many lines/actions in %flood.unset ban them
set %flood.lines 6
;this is the bantime in seconds
set %flood.bantime 300
}
on @*:text:*:#JMS:{
if ($nick !isop $chan) { _floodchk }
}
on @*:action:*:#JMS:{
if ($nick !isop $chan) { _floodchk }
}
alias -l _floodchk {
hinc -mz $+(flood.,#) $site %flood.unset
if ($hget($+(flood.,#),$site) > $calc(%flood.lines * %flood.unset)) {
  ban $+(-ku,%flood.bantime) # $nick 3 Flood protection: 6 lines in 10 seconds, 5 minute ban! 
  hdel $+(flood.,#) $site
}
}


But for some reason, it isn't working at all. I have inserted it into my scripts under Remote, pressed okay and restarded mirc, still doesn't work. I've tried it a few times.

Anyone know why this isn't working? Thanks!

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
your using hash table commands, hinc, hdel, hget, but you don't specify the hash table and I also don't see any spot where a hash table is created.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
His hashtable is $+(flood.,#) and its created here hinc -mz $+(flood.,#) $site %flood.unset

He can try this, i just wrote it, it doesnt bother to use a hash table, since all its vars a global/temps besisdes its ON START values

Code:
on *:start: {
  ;if user sends more than %flood.lines in this time ban them
  set %flood.unset 10
  ;
  ;if a user sends more than this many lines/actions in %flood.unset ban them
  set %flood.lines 6
  ;
  ;this is the bantime in seconds
  set %flood.bantime 300
}
on @*:text:*:#JMS:{ if ($nick !isop $chan) { _floodchk } }
on @*:action:*:#JMS:{ if ($nick !isop $chan) { _floodchk } }
alias -l _floodchk {
  set -u $+ %flood.unset $+(%,flood.,#,.,$site,.,$ticks,$rand(10000,19999)) .
  if ($var($+(%,flood.,#,.,$site,.*),0) > %flood.lines) {
    ban $+(-ku,%flood.bantime) # $nick 3 Flood protection: More than %flood.lines lines in %flood.unset seconds, $duration(%flood.bantime) ban! 
    unset $+(%,flood.,#,.,$site,.*)
  }
}


* code is untested

Joined: Feb 2005
Posts: 15
D
dtrmp4 Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Feb 2005
Posts: 15
It kind of worked. I got some people to flood, but it only kicked one.

<@Spark> s
<@Spark> adf
<@OddSoup> oeiwqroque
<@Spark> sdaf
<@Spark> s
<@Spark> daf
<@Spark> sdf
<@OddSoup> rqeowuroiuqweior
<%AllGone> k
<@OddSoup> qweruqwioeurioqwe
<@Spark> asdf
<@OddSoup> r
<@OddSoup> qwe
<@OddSoup> rq
<%AllGone> ;lkjlmkjl;
<@OddSoup> werq
<@OddSoup> we
<@OddSoup> r
<@Spark> sad
<%AllGone> kl
<@OddSoup> qwe
<@OddSoup> r
<%AllGone> l
<@OddSoup> qwe
<%AllGone> l
<%AllGone> l
<%AllGone> l
<@Spark> f
<@OddSoup> r
<%AllGone> l
* dtrmp sets mode: +b *!*mathgreml@*.phil.east.verizon.net
* AllGone was kicked by dtrmp (Flood protection: More than 6 lines in 10 seconds, 5mins ban!)

There was also flooding before, just copied the part where he got banned.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I only saw one "USER" flooding there, the rest were ops and there all excluded

if ($nick !isop $chan)


Link Copied to Clipboard