Advertisement
westor

Flood Repeat Protection for Dune2K v1.2

Jun 1st, 2020
1,524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.47 KB | None | 0 0
  1. alias -l chans { return #SWGhost }
  2. alias -l flood_reps { return 3 }
  3. alias -l flood_secs { return 6 }
  4.  
  5. ON @*:TEXT:*:$($chans): {
  6.   tokenize 32 $strip($1-)
  7.  
  8.   var %md5 = $md5($1-)
  9.   var %old_md5 = $evalnext($+(%,flood,_,$nick,_,msg))
  10.  
  11.   if (%old_md5) && (%old_md5 !== %md5) { return }
  12.  
  13.   set $+(-eu,$flood_secs) $+(%,flood,_,$nick,_,msg) %md5
  14.   inc $+(-eu,$flood_secs) $+(%,flood,_,$nick,_,reps) 1
  15.  
  16.   var %t = $evalnext($+(%,flood,_,$nick,_,reps))
  17.  
  18.   if (%old_md5) && (%old_md5 !== %md5) && (%t) { unset $+(%,flood,_,$nick,_,reps) }
  19.  
  20.   if (%t >= $flood_reps) {
  21.     inc -e $+(%,flood,_,$nick,_,rep_warns) 1
  22.  
  23.     var %w = $evalnext($+(%,flood,_,$nick,_,rep_warns))
  24.  
  25.     if (%w == 1) {
  26.       describe $chan Has muted $nick (This is your $ord(%w) warning, 5 minutes ban for repeating!)
  27.  
  28.       ban -u300 $chan $nick 3
  29.  
  30.       msg $nick you have been muted for 5 mins due to spaming ! restarting client while an auto mute  will cause for you a ban for the rest of mute duration!
  31.  
  32.       break
  33.     }
  34.     if (%w == 2) {
  35.       describe $chan Has muted $nick (This is your $ord(%w) warning, 10 minutes ban for repeating!)
  36.  
  37.       ban -u600 $chan $nick 3
  38.  
  39.       msg $nick you have been muted for 10 mins due to spaming! restarting client while an auto mute  will cause for you a ban for the rest of mute duration!
  40.  
  41.       break
  42.     }
  43.     if (%w >= 3) {
  44.       describe $chan Has muted $nick (Some peole don't listen, 15 minutes ban for repeating!)
  45.  
  46.       ban -ku900 $chan $nick 3 Some peole don't listen, 15 minutes ban for flooding!
  47.  
  48.       msg $nick you have been muted for 15 mins due to spaming! restarting client while an auto mute  will cause for you a ban for the rest of mute duration! if you keep acting likethis you may get ban from an admin
  49.  
  50.       break
  51.     }
  52.   }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement