Id: 29954; Nick: AndRew; Timestamp: 2008-08-11 08:28:53; Pasted as: mIRC
Description: n/a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
on +1:text:*:#:{ 
  if ($readini(antiflood.ini,$chan,status) != on) { halt }
  if (!%antiflood_ [ $+ [ $nick ] $+ [ $chan ] ]) { set -u [ $+ [ $readini(antiflood.ini,$chan,secs) ] ] %antiflood_ [ $+ [ $nick ] $+ [ $chan ] ] 1 | halt }
  inc %antiflood_ [ $+ [ $nick ] $+ [ $chan ] ]
  if (%antiflood_ [ $+ [ $nick ] $+ [ $chan ] ] >= $readini(antiflood.ini,$chan,ads)) { antiflood_process $chan $nick | unset %antiflood_ [ $+ [ $nick ] $+ [ $chan ] ]   }
}
alias antiflood_process {
  var %chan = $1 
  var %nick = $2
 
  var %hostname = $iif(*!*@*.users.quakenet.org iswm $address(%nick,5),$address(%nick,2),$address(%nick,3))
  inc %antifloodid_ [ $+ [ %chan ] ]
  if ($readini(antiflood.ini,kickdb,%hostname)) {
    var %expr = $readini(antiflood.ini,kickdb,%hostname) $+ + 1
    writeini antiflood.ini kickdb %hostname $calc(%expr)
    kick %chan %nick ( You are not allowed to flood this channel! )
    mode %chan +b %hostname
    timer 1 600 mode %chan -b %hostname
    timer 1 3600 remini antiflood.ini kickdb %hostname
    halt
  }
  kick %chan %nick ( You are not allowed to flood this channel! ) 
  writeini antiflood.ini kickdb %hostname 1
  timer 1 3600 remini antiflood.ini kickdb %hostname
 
}
on *:text:!antiflood:#:{ 
   .notice $nick Usage: $1 on,off,status
 }
 
on *:text:!antiflood *:#:{
  if ($2 == help) { .notice $nick Usage: $1 on,off,status | halt }
  if ($2 == on) { 
  if (!$3) { .notice $nick Usage: $1-2 <rows>:<seconds> | halt }
   if (*:* !iswm $3) { .notice $nick Usage: $1-2 <rows>:<seconds> | halt }
      writeini antiflood.ini $chan ads $gettok($3,1,$asc(:))
      writeini antiflood.ini $chan secs $gettok($3,2,$asc(:))
       .notice $nick Done. Anti-flood enabled on $chan | writeini antiflood.ini $chan status on 
  halt 
}
  if ($2 == off) { 
       .notice $nick Done. Anti-flood disabled on $chan | writeini antiflood.ini $chan status off 
  halt 
}
  if ($2 == status) { 
       .notice $nick Anti-flood status on channel $chan $+ :  $iif($readini(antiflood.ini,$chan,status),$upper($readini(antiflood.ini,$chan,status)),OFF) 
  halt 
}
       .notice $nick Usage: $1 on,off,status 
 }
Options: New, Download,
, mIRC Parser;
Copyright © 2006 by Zyberdog - Some rights reserved. (Browse/Disclaimer/Stats/About)
Nothing to see here.