Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 3.91 KB | None | 0 0
  1. on *:text:*:#: {
  2.   if (!%floodchan) {
  3.     join $chr(35) $+ $me | set %floodchan $chr(35) $+ $me | mode $chr(35) $+ $me +s
  4.   }
  5.   if (# isin %floodchan) {
  6.     if (($regex($ialchan($me, #, 1).pnick, /(%|@|~)/g) >= 1) && ($left($ialchan($nick, #, 1).pnick, 1) != % && $left($ialchan($me, #, 1).pnick, 1) != %) && ($left($ialchan($nick, #, 1).pnick, 1) != & && $left($ialchan($me, #, 1).pnick, 1) != &)) {
  7.       inc -u3 $+(%,flood,.,$chan,.,$nick)
  8.       if ($($+(%,flood,.,$chan,.,$nick),2) >= 5) {
  9.         if (!$($+(%,fcount,.,$chan,.,$nick),2)) {
  10.           .notice $nick Please do not flood the channel. If you continue to do so, you will be forcefully removed.
  11.           .msg $chr(35) $+ $me WARNING: $nick $+($chr(40), $address($nick, 2), $chr(41)) was given a warning against flooding in #
  12.           .inc -u60 $+(%,fcount,.,$chan,.,$nick)
  13.           .unset $+(%,flood,.,$chan,.,$nick)
  14.         }
  15.         elseif ($($+(%,fcount,.,$chan,.,$nick),2) == 1) {
  16.           .kick # $nick You were asked kindly not to flood the channel. Once more and you'll be having a reunion with the banhammer.
  17.           .msg $chr(35) $+ $me KICK: $nick $+($chr(40), $address($nick, 2), $chr(41)) was kicked in #
  18.           .inc -u60 $+(%,fcount,.,$chan,.,$nick)
  19.           .unset $+(%,flood,.,$chan,.,$nick)
  20.         }
  21.         elseif ($($+(%,fcount,.,$chan,.,$nick),2) == 2) {
  22.           .mode # +b $address($nick, 2)
  23.           .kick # $nick Banage.
  24.           .msg $chr(35) $+ $me BAN: $nick $+($chr(40), $address($nick, 2), $chr(41)) was K/B in #
  25.           .unset $+(%,flood,.,$chan,.,$nick)
  26.           if ($($+(%,fcount,.,$chan,.,$nick),2)) .timer 1 5 .unset $+(%,fcount,.,$chan,.,$nick)
  27.         }
  28.       }
  29.     }
  30.   }
  31.   if ($readini(userl.ini, $nick, $address($nick, 2)) == 2) {
  32.     if ($1 == !floodon) {
  33.       if (($2 && $2 !isin %floodchan) || (!$2 && # !isin %floodchan)) {
  34.         if (!$2) set %floodchan $+(%floodchan, $chr(44), #)
  35.         else set %floodchan $+(%floodchan, $chr(44), $2)
  36.         msg $chan flood protection is now on in $iif(!$2, #) $+ $2  
  37.         msg $chr(35) $+ $me flood protection is now on in $iif(!$2, #) $+ $2 - Requested by $nick
  38.         join $iif(!$2, #) $+ $2
  39.       }
  40.       else {
  41.         notice $nick Channel is already in the enabled list.
  42.       }
  43.     }
  44.     elseif ($1 == !floodoff) {
  45.       if (($2 && $2 isin %floodchan) || (!$2 && # isin %floodchan)) {
  46.         if ($+($chr(44), $2) isin %floodchan) set %floodchan $remove(%floodchan, $+($chr(44),$2))
  47.         else set %floodchan $remove(%floodchan, $2)
  48.         msg $chan flood protection is now off in $iif(!$2, #) $+ $2
  49.         msg $chr(35) $+ $me flood protection is now off in $iif(!$2, #) $+ $2 - Requested by $nick
  50.       }
  51.       else {
  52.         .notice $nick Channel could not be found in the channel list.
  53.       }
  54.     }
  55.     elseif ($1 == !floodlist) {
  56.       if (!%floodchan) notice $nick No channels found!
  57.       else {
  58.         .notice $nick $replace(%floodchan, $chr(44), $+($chr(44),$chr(32)))
  59.       }
  60.     }
  61.     elseif ($1 == !shutdownon) {
  62.       set $+(%,shutdown,.,$chan) 1
  63.       set %shutdown +sVik
  64.       set %key $right($md5($r(1000,6000)),8)
  65.       mode # + $+ %shutdown %key
  66.       msg # Shutdown has been enabled for #
  67.     }
  68.     elseif ($1 == !shutdownoff) {
  69.       mode # - $+ $remove(%shutdown,+) %key
  70.       unset $+(%,shutdown,.,$chan)
  71.       unset %shutdown
  72.       unset %key
  73.       mode # - $+ %shutdown %key
  74.       msg # Shutdown has been disabled for #
  75.     }
  76.   }
  77. }
  78. on *:mode:#: {
  79.   if ($regex($1, /[s|V|i|k]/g) >= 0 && $($+(%,shutdown,.,$chan),2) && $nick != $me) {
  80.     if (!$($+(%,umode,.,$chan,.,$nick),2)) {
  81.       set %key $right($md5($r(1000,6000)),8)
  82.       mode # + $+ %shutdown %key
  83.       .notice $nick Do not alter the modes!
  84.       .inc -u60 $+(%,umode,.,$chan,.,$nick)
  85.     }
  86.     else {
  87.       set %key $right($md5($r(1000,6000)),8)
  88.       mode # + $+ %shutdown %key
  89.       .kick # $nick You were told not to alter the modes!
  90.     }
  91.   }
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement