mIRC Homepage
Posted By: learn3r spam detection help - 06/11/06 02:27 AM
on ^*:open:?: {
echo $nick commonchans: -------------
var %spam = #!.com!join #

;then matchtok if the $1- contains a spam word
if does gets the *!*@host and bans the users host on every chan that i'm opped in...
if match or someone on the channels that im opped in has the same host kicks and ban em
}


---------

help pls thanks..
alias comchans {
var %cs.all = $comchan($1,0)
var %cs.chans
if ( %cs.all > 0 ) { set %cs.chans $comchan($1,%cs.all) }
else { set %cs.chans CommonChan:None }
dec %cs.all 1
:cs
while ( %cs.all > 0 ) {
set %cs.chans %cs.chans $+ , $+ $comchan($1,%cs.all)
dec %cs.all
}
return %cs.chans
}
Posted By: deegee Re: spam detection help - 06/11/06 06:42 AM
Quote:
on ^*:open:?: {
echo $nick commonchans: -------------
var %spam = #!.com!join #

;then matchtok if the $1- contains a spam word
if does gets the *!*@host and bans the users host on every chan that i'm opped in...
if match or someone on the channels that im opped in has the same host kicks and ban em
}

Try Searching, I'm sure you'll find many wink


Quote:
---------

help pls thanks..
alias comchans {
var %cs.all = $comchan($1,0)
var %cs.chans
if ( %cs.all > 0 ) { set %cs.chans $comchan($1,%cs.all) }
else { set %cs.chans CommonChan:None }
dec %cs.all 1
:cs
while ( %cs.all > 0 ) {
set %cs.chans %cs.chans $+ , $+ $comchan($1,%cs.all)
dec %cs.all
}
return %cs.chans
}

Code:
alias comchans {
  var %i = 1,%cc
  while $comchan($$1,%i) { var %cc = $addtok(%cc,$v1,44) | inc %i }
  return %cc
}
Posted By: learn3r Re: spam detection help - 06/11/06 06:54 AM
Try Searching, I'm sure you'll find many

None
Posted By: deegee Re: spam detection help - 06/11/06 07:46 AM
I'm sure there is, try using better/different keywords (+spam +filter etc), and expand the date range.
Posted By: learn3r Re: spam detection help - 06/11/06 03:37 PM
still got nothing like i requested,,,
Posted By: HaleyJ Re: spam detection help - 06/11/06 04:42 PM
Code:
 on ^*:open:?: {
  var %a = 0
  while (%a < $numtok(%spamwords,32)) {
    inc %a
    var %spamcheck = $gettok(%spamwords,%a,32)
    if ($istok($strip($1-),%spamcheck,32) == $true) {
      var %hai = 0
      while (%hai <= $comchan($nick,0)).op { 
        inc %hai
        ban -ku $comchan($nick,%hai) $nick 2 Private message spammer
      }
    }
  }
}
menu channel {
  Add SpamWords
  .Add:/set %spamwords $addtok(%spamwords,$$?,32) | echo -a 4SpamWord Added.
  .Remove:/set %spamwords $remtok(%spamwords,$$?,32) | echo -a 4SpamWord Removed.
}  


Remember its an on OPEN event so if you have a query window with that user already open it wont work
Posted By: learn3r Re: spam detection help - 06/11/06 04:50 PM
already have that kind of script with dialog...

what im requesting is
if not on my channels it will ban the
*!*@host of the spammer so that spammer won't be able to join the channels that im opped in..

spammers spam by joining then parting after 30 or more secs..
then message the users on the channel we're it joined
Posted By: MikeChat Re: spam detection help - 06/11/06 05:03 PM
write it yourself

on open with $wildsite
if spam detected in query then ban that address in all the channels you have ops in

and dont forget /close -m $nick
Posted By: learn3r Re: spam detection help - 06/11/06 05:12 PM
ok il have to ask how to ban the spammer's host in all channels im opped
Thanks
and thanks halleyJ
Posted By: MikeChat Re: spam detection help - 06/11/06 05:25 PM
Code:
on *:open:?:{
  set %queryID $wildsite
}
on *:text:*:?:{

  if (* badword * iswm $1-) { goto ban }

  close -m $nick

  :ban 
  var %count = $comchan($me,0)
  var %i = 1
  while (%i <= %count) {
    if ($me isops $comchan($me,%i)) {
      ban -u15 $comchan($me,%i) %queryID
    }
    inc %i
  }
}
play with that
Posted By: learn3r Re: spam detection help - 06/11/06 05:29 PM
hehehe thanks mikechat...
grin grin grin
Posted By: HaleyJ Re: spam detection help - 06/11/06 05:32 PM
Code:
on ^*:open:?: {
  var %a = 0
  while (%a < $numtok(%spamwords,32)) {
    inc %a
    var %spamcheck = $gettok(%spamwords,%a,32)
    if ($istok($strip($1-),%spamcheck,32) == $true) {
      var %hai = 0
      while (%hai <= $chan(0)) { 
        inc %hai
        if ($me isop $chan(%hai)) {
          ban $chan(%hai) $wildsite
        }
      }
    }
  }
}
menu channel {
  Add SpamWords
  .Add:/set %spamwords $addtok(%spamwords,$$?,32) | echo -a 4SpamWord Added.
  .Remove:/set %spamwords $remtok(%spamwords,$$?,32) | echo -a 4SpamWord Removed.
} 


modified as per your request
Posted By: learn3r Re: spam detection help - 06/11/06 05:46 PM
Code:
on ^*:open:?: {
  var %a = 0
  while (%a < $numtok(%spamwords,32)) {
    inc %a
    var %spamcheck = $gettok(%spamwords,%a,32)
    if ($istok($strip($1-),%spamcheck,32) == $true) {
      var %hai = 0
      while (%hai <= $chan(0)) {
        inc %hai
        if ($me isop $chan(%hai)) ban $chan(%hai) $wildsite
        else { if ($me !isop $chan(%hai)) cs op $chan $me | ban $chan(%hai) $wildsite }
      }
    }
  }
} 
 


Thanks HaleyJ
could i use this when im not op?
Posted By: HaleyJ Re: spam detection help - 06/11/06 11:38 PM
no that wont work i will work on it somemore tomorrow, LOLZ its my birthday today and my avatar is a birthday cake :P laugh laugh laugh laugh laugh
© mIRC Discussion Forums