mIRC Home    About    Download    Register    News    Help

Print Thread
#181419 23/07/07 07:34 AM
Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Dunno what I did but its not kicking when someone pm me a badword....any ideal why?

Code:
on *:open:*: {
if ( %badword == off ) || ( %badword == $null ) || ($nick isop $chan) { return }
  var %badword = $chr(35) $+ ,kupal,fuckoff,blowjob,suck,whore,asshole,bitch,slut,clik,suckmydick,puta,cunt,horny,fucker,pussy,click,fuck,show,sex,biatch,dick,fuckin,ass,gay,seb,cock,bastard,fuckyou,shit,
  var %cnt = 1
  while (%cnt <= $numtok(%badword,44)) {
    if ($gettok(%badword,%cnt,44) isin $1-) {
      spamdetect
      closemsg $nick
      break
    }
    inc %cnt
  }
}

on ^*:notice:*:?: {
if ( %badword == off ) || ( %badword == $null ) || ($nick isop $chan) { return }
  if ($nick == ChanServ || $nick == NickServ || $nick == MemoServ) { return }
  var %badword = $chr(35) $+ ,kupal,fuckoff,blowjob,suck,whore,asshole,bitch,slut,clik,suckmydick,puta,cunt,horny,fucker,pussy,click,fuck,show,sex,biatch,dick,fuckin,ass,gay,seb,cock,bastard,fuckyou,shit,
  var %cnt = 1
  while (%cnt <= $numtok(%badword,44)) {
    if ($gettok(%badword,%cnt,44) isin $1-) {
      spamdetect
      haltdef
    }
    inc %cnt
  }
}

alias spamdetect {
  var %a = 1
  if $comchan($nick,0) {
    while $comchan($nick,%a) {
      var %chan = $v1
      if ($me isop %chan) && ($nick !isop %chan) { ban -ku3600 %chan $nick 2 14Private Offensive Language }
      inc %a
    }
  }
}


 

Last edited by Garou; 23/07/07 07:35 AM.
Garou #181424 23/07/07 11:05 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
on *:open:*: {

Should be
Code:
on *:open:?:*: {


I removed both instances of:

Code:
($nick isop $chan)


Because as the target is your pm, $chan will always be $null.

Code:
on *:open:?:*: {
  if (%badword == off) || (!%badword) { return }
  var %badword = $chr(35) $+ ,kupal,fuckoff,blowjob,suck,whore,asshole,bitch,slut,clik,suckmydick,puta,cunt,horny,fucker,pussy,click,fuck,show,sex,biatch,dick,fuckin,ass,gay,seb,cock,bastard,fuckyou,shit,
  var %cnt = 1
  while (%cnt <= $numtok(%badword,44)) {
    if ($gettok(%badword,%cnt,44) isin $1-) {
      spamdetect
      closemsg $nick
      break
    }
    inc %cnt
  }
}

on ^*:notice:*:?: {
  if (%badword == off) || (!%badword) { return }
  if ($nick == ChanServ || $nick == NickServ || $nick == MemoServ) { return }
  var %badword = $chr(35) $+ ,kupal,fuckoff,blowjob,suck,whore,asshole,bitch,slut,clik,suckmydick,puta,cunt,horny,fucker,pussy,click,fuck,show,sex,biatch,dick,fuckin,ass,gay,seb,cock,bastard,fuckyou,shit,
  var %cnt = 1
  while (%cnt <= $numtok(%badword,44)) {
    if ($gettok(%badword,%cnt,44) isin $1-) {
      spamdetect
      haltdef
    }
    inc %cnt
  }
}

alias spamdetect {
  var %a = 1
  if $comchan($nick,0) {
    while $comchan($nick,%a) {
      var %chan = $v1
      if ($me isop %chan) && ($nick !isop %chan) { ban -ku3600 %chan $nick 2 14Private Offensive Language }
      inc %a
    }
  }
}


I also don't understand why you want to ban someone from every room you and they are in for an hour for saying a 'badword' I feel it's a little personal to bring channels into this, but it is of course your code and choice. smile

Joined: Aug 2006
Posts: 469
G
Garou Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Aug 2006
Posts: 469
Its fine now and yes your right the ban should be 600 not 3600.....thx again mate.


Link Copied to Clipboard