mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
its from the pnp script and its a great script but its heavy for my pc.. i just wanted the swearkick script thats all can anyone help me?
Code:
on *:TEXT:*:%<protect.text:if ($_protect(text)) return | _txprot $1-
on *:ACTION:*:%<protect.text:if ($_protect(text)) return | _txprot $1-

alias -l _txprot {
  if ($_getcflag($chan,24)) _wordkick 1 , $1- ,
  if ($_getcflag($chan,25)) _wordkick 2 , $1- ,
}

alias -l _wordkick {
  var %words = $hget(pnp.config,$+(wordk,$1,.,$chan))
  if (%words == $null) %words = $hget(pnp.config,$+(wordk,$1,.*))
  if (%words) {
    var %match,%stripped,%num = $numtok(%words,44)
    %stripped = , $replace($strip($3-),!,.,$chr(44),.,-,.,$chr(40),.,$chr(41),.,?,.,",.,.,$chr(32)) ,
    while (%num) {
      %match = * $gettok(%words,%num,44) *
      if (%match iswm %stripped) { some command here }
      if (%match iswm $2-) { some command here }
      dec %num
    }
  }
}

Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
There's a lot more to that than the couple of aliases you have there.

Just do a search on this board, or look on a scripts site, for one of the hundreds of 'badword' kickers already coded wink

Joined: Jun 2004
Posts: 124
S
sigbin Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 124
okie am deegee... am can you fix this code atleast because it gets long when i have the same script for the TEXT and ACTION... not actually mean by fix but can you make one just like this?

Code:
on *:TEXT:*:%<protect.text:if ($_protect(text)) return | _txprot $1-
on *:ACTION:*:%<protect.text:if ($_protect(text)) return | _txprot $1-

alias -l _txprot {
  if ($_getcflag($chan,24)) _wordkick 1 , $1- ,
  if ($_getcflag($chan,25)) _wordkick 2 , $1- ,
}

alias -l _wordkick {
  command
  command
}

Joined: Aug 2007
Posts: 41
P
Ameglian cow
Offline
Ameglian cow
P
Joined: Aug 2007
Posts: 41
PNP can be a hard script if you have no idea what you are doing but i will just add that if your server/server you are using has botserv it will have a ready kick in it you can set to kick once then if they swear again it will ban them you can set it to do this after a certain amount of times however I do not like people that swear therefore if you swear in my room it does not show the word it shows <censored> insted and i have added <censored> to my badword list so it will ban them straight away i do think there is no need to swear there are other words insted


CrazyMan IRC Bot Admin
IRC UnGoWa Support
NeoBlab Server-Admin
Chat Operator
Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
There's tons of badword/filter kickers already posted here, more on other scripting sites...

Here's a quick code you can try...
Code:
on *:start:_badwd
on *:disconnect:if $hget(badwd) { hsave -n badwd badwords.txt }
on @*:text:*:#:badwds $1-
on @*:action:*:#:badwds $1-
alias -l badwds {
  _badwd
  if $hfind(badwd,$strip($1-),1,W).data {
    ban -ku300 # $nick 2 Swearing
  }
}
alias -l _badwd {
  if !$hget(badwd) {
    hmake badwd 20
    if $file(badwords.txt) { hload -n badwd badwords.txt }
  }
}
alias add.badword { _badwd | hadd badwd $ticks $replace($+(*,$$?1,*),**,*) | hsave -n badwd badwords.txt }

  • Make badwords.txt one word per line using wildcards (* or ?)...

    *swearword*
    *badword*
    *bug?er*
    *vulgarity*
    *expl?tive*
    *etc..*

Or add words with /add.badword [color:gray][word][/color]


Link Copied to Clipboard