mIRC Homepage
Posted By: ashleyb auto kick - 12/09/07 11:47 AM
hi im looking for a addon or snippet that when someone says a certain word it will warn them if they say it again it will kick and if again kick and ban can anyone help me please???
Posted By: Thrull Re: auto kick - 12/09/07 12:31 PM
Are looking for it for a single word or a set of words? If its a single word or a very small set of words, it easy to do. Though, the sleeping pills are kicking in so I can't do it right now.

If you have a larger set of words that you're looking to use in this, then it becomes a bit more complex. Are you sure you always want it to war, then kick, then kick/ban? Often times when people request this, they end up wanting it to work so that a certain set of words is a ban. Another set is a kick, then a ban. And finally a warn then a kick, then a ban.
Posted By: ashleyb Re: auto kick - 12/09/07 12:57 PM
yes i want it to warn then kick then kickban i have alot of words id like to use but i can use for example a snippet for 1 word and just copy and paste it and edit the word.... yeah i know im lazy lol
Posted By: Thrull Re: auto kick - 12/09/07 01:16 PM
I can give you the pesudo code for it.

On text
if Word is Said {
if $Nick $+ Lang !exists { Set $nick $+ Lang to 1 }
else { inc $Nick $+ Lang }
if $Nick $+ Lang = 1 { msg $nick Warn }
if $Nick $+ Lang = 2 { kick $nick }
if $Nick $+ Lang = 3 { ban $nick | unset $Nick $+ Lang }
}

i'll type up the real code later. Chances are you'll need a text file to look up the words as its much easier editing the text file than the script every time you want to change things.
Posted By: ashleyb Re: auto kick - 12/09/07 01:18 PM
cheers bro
Posted By: ashleyb Re: auto kick - 13/09/07 04:13 AM
anyone else have any ideas??? about how i can achieve this???
Posted By: deegee Re: auto kick - 13/09/07 04:35 AM
Searching would turn up some useful posts, such as this one.

To do the warn/kick/kickban, change the badwds alias in that code to this
Code:
alias -l badwds {
  _badwd
  if $hfind(badwd,$strip($1-),1,W).data {
    if $($+(%warn,$site),2) > 2 { ban -ku300 # $nick 2 Swearing }
    else {
      inc $iif(!$v1,-u1800) %warn $+ $site
      if $($+(%warn,$site),2) == 2 { kick # $nick Swearing }
      else msg # No swearing please $nick -first warning-
    }
  }
}
Posted By: ashleyb Re: auto kick - 13/09/07 08:48 AM
cheers man it works a champion laugh
© mIRC Discussion Forums