Advertisement
westor

Repeat Flood Protection for Dark v1.0

Nov 12th, 2015
407
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.46 KB | None | 0 0
  1. ON @*:TEXT:*:#: {
  2.   if ($nick isop #) { return }
  3.   if ($chan == #botops) { return }
  4.   if (!$window(@Botlog)) { window -n @Botlog }
  5.   var %text = $strip($1-)
  6.   if (!%text) { return }
  7.   var %old = %rptext_ [ $+ [ $chan ] $+ ] _ [ $+ [ $nick ] ]
  8.   var %times = %rp_ [ $+ [ $chan ] $+ ] _ [ $+ [ $nick ] ]
  9.   var %total = %reps_ [ $+ [ $chan ] ]
  10.   var %total = $calc(%total +1)
  11.   if (%total == 8) {
  12.     unset %rp_ [ $+ [ $chan ] $+ ] _ [ $+ [ $nick ] ] %rptext_ [ $+ [ $chan ] $+ ] _ [ $+ [ $nick ] ]
  13.     return
  14.   }
  15.   if (!%times) {
  16.     set -eu30 %rp_ [ $+ [ $chan ] $+ ] _ [ $+ [ $nick ] ] 1
  17.     set -eu30 %rptext_ [ $+ [ $chan ] $+ ] _ [ $+ [ $nick ] ] %text
  18.     return
  19.   }
  20.   var %times = $calc(%times +1)
  21.   if (%times) && (%old !== %text) { return }
  22.   inc -eu30 %rp_ [ $+ [ $chan ] $+ ] _ [ $+ [ $nick ] ]
  23.   inc -eu30 %reps_ [ $+ [ $chan ] ]
  24.   if (%times == 3) && (*german* !iswm $chan)  { notice $nick Please do not continue to repeat yourself. | aline -a @Botlog $timestamp [Repeat] $network - $chan - $nick - $fulladdress -  Repeating WARN. }
  25.   if (%times == 3) && (*german* iswm $chan)  { notice $nick Bitte wiederhole dich nicht. | aline -a @Botlog $timestamp [Repeat] $network - $chan - $nick - $fulladdress -  Wiederholte Warnen. }
  26.   if (%times == 4) && (*german* !iswm $chan)  { kick $chan $nick Please do not continue to repeat yourself. | aline -a @Botlog $timestamp [Repeat] $network - $chan - $nick - $fulladdress -  Repeating Kick. }
  27.   if (%times == 4) && (*german* iswm $chan)  { kick $chan $nick Bitte wiederhole dich nicht. | aline -a @Botlog $timestamp [Repeat] $network - $chan - $nick - $fulladdress -  Wiederholte Kick. }
  28.   if (%times == 5) && (*german* !iswm $chan) { aline -a @Botlog $timestamp [Repeat] $network - $chan - $nick - $fulladdress -  Repeating  Ban. | write Botlog.txt $timestamp [Repeat] $network - $chan - $nick - $fulladdress - Repeating  Ban. | ban -ku14400 $chan $nick 2 Banned: Please stop repeating. - [4hours banned] | unset %rptext_ [ $+ [ $chan ] $+ ] _ [ $+ [ $nick ] ] %rp_ [ $+ [ $chan ] $+ ] _ [ $+ [ $nick ] ] }
  29.   if (%times == 5) && (*german* iswm $chan) { aline -a @Botlog $timestamp [Repeat] $network - $chan - $nick - $fulladdress -  Repeating  Ban. | write Botlog.txt $timestamp [Repeat] $network - $chan - $nick - $fulladdress - Repeating  Ban. | ban -ku14400 $chan $nick 2 Gebannt: Bitte wiederhole dich nicht. - [4 Stunden verboten] | unset %rptext_ [ $+ [ $chan ] $+ ] _ [ $+ [ $nick ] ] %rp_ [ $+ [ $chan ] $+ ] _ [ $+ [ $nick ] ] }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement