mIRC Homepage
Posted By: Babystone New to scripting - 14/05/09 10:00 AM
Can anyone help? How can i write a code for warning on swearing, second offence a kick if they swaer for the third time a ban? Is it possible to do tat?

Posted By: RusselB Re: New to scripting - 14/05/09 03:27 PM
Search for a bad word script.
A couple of good sites for scripts are Hawkee mIRC Scripts and mIRC.net
Posted By: Tomao Re: New to scripting - 14/05/09 05:46 PM
This is one version of bad-word script with warnings as requested. It goes into your opped bot's remote. All you need to do is change word1, word2 etc...(with a space between each) with the ones you want to warn/kick for.
Code:
on @*:TEXT:*:#: {
  var %x = 1
  var %y = word1 word2 word3 word4 word5 word6 word7 word8 word9 word10
  while ($gettok(%y,%x,32)) { 
    if ($wildtok($1-,$+(*,$v1,*),1,32)) {
      hinc -m warn $nick
      if ($hget(warn,$nick) == 1) {
        .msg $chan $nick $+ , this is your $ord($hget(warn,$nick)) warning on swearing.
      }
      elseif ($hget(warn,$nick) > 2) { 
        .ban -k $chan $nick 2 Please don't swear in $chan $+ . 
        .hdel warn $nick 
      }
      else { 
        .kick $chan $nick This is your $ord($hget(warn,$nick)) warning on swearing. $&
          Continue doing so will result a ban. 
      }
    }
    inc %x
  }
}

There are many ways of making a script like this. And even though this script is not the best method, it should be good enough to kick for some bad words you want to look after.
© mIRC Discussion Forums