mIRC Home    About    Download    Register    News    Help

Print Thread
#121365 26/05/05 05:09 PM
M
Mlupu
Mlupu
M
Hello.
I want to ask you something. When someone joined a channel and he make spam, i want to kick/ban him.

Example:
<condensator> Join #bucuresti .Thanks
*** ml sets mode: +b *!*@home-313682.galati.astral.ro
*** condensator was kicked by Operator (BANNED:You had make spam. (tempban 30m))

I guess you understand what i'm trying to say. Thank you.

#121366 26/05/05 05:39 PM
D
defiant
defiant
D
I use something like this
- It excludes Ops & Voiced
- %SP_Punish
- 1 = kick
- 2 = first kick, and 2nd time ban + kick
- 3 = ban + kick all the time

You need to change
<SPAM TIME HERE> into something like 4

and
<NR OF LINES HERE>) into something like 3

That's an anti-spam script.

Code:
 
alias spam-decrease {
  var %temp = %spam. [ $+ [ $1 ] ]
  if !%temp { goto end }
  var %nl = $calc( %temp -1)
  if (%nl &lt;= 0) { unset %spam. [ $+ [ $1 ] ] | goto end }
  set %spam. $+ $1 %nl
  :end
}
on *:TEXT:*:#: {
  if ($nick isop $chan) { goto end }
  if ($nick isvoice $chan) { goto end }

  ;### SPAM Protect
  if (%spam. [ $+ [ $address ] ]) { inc %spam. $+ $address 1 }
  if !%spam. [ $+ [ $address ] ] { set %spam. $+ $address 1 }
  .timer 1 &lt;SPAM TIME HERE&gt; spam-decrease $address
  if (%spam. [ $+ [ $address ] ] &gt;= &lt;NR OF LINES HERE&gt;) {
    if (%SP_punish == 1) { 
      kick $chan $nick Stop spamming 
      unset %spam. [ $+ [ $address ] ]
    }
    if (%SP_Punish == 3) { 
      mode $chan +b $address($nick,2)
      kick $chan $nick Stop spamming
      .timer 1 600 mode # -b $address($nick,2)
      unset %spam. [ $+ [ $address ] ]
    }
    if (%SP_Punish == 2) { 
      if ($address isin %kick.spam) {
        mode $chan +b $address($nick,2)
        kick $chan $nick Stop spamming
        .timer 1 600 mode # -b $address
        set %kick.spam $replace(%kick.spam,$address,)
        unset %spam. [ $+ [ $address ] ]
      }
      else {
        kick $chan $nick Stop spamming
        set %kick.spam %kick.spam $address
        unset %spam. [ $+ [ $address ] ]
      }
    }
  }
  :end
}

 


--

If you don't want someone in your channel who says a channel within 1min:

Code:
on *:JOIN:#: {
  set %joined. $+ $adress 1
  .timer 1 60 unset %joined. [ $+ [ $address ] ]
}
on *:TEXT:*:#: {
  if ($chr(35) isin $1-) { 
    if %joined. [ $+ [ $address ] ] { 
      mode # +b $adress($nick,2) 
      kick # $nick (No advertising)
    }
  }
}

#121367 01/06/05 04:39 PM
M
Mlupu
Mlupu
M
I had found another code and is more simple:
Code:
 on @*:text:*#*:#: if ($nick !isop $chan) &amp;&amp; ($nick !isvoice #) { mode # +b $address($nick,2) | kick # $nick BANNED: spam! }

  

Thank you anyway . You're codes are good too.


Link Copied to Clipboard