mIRC Home    About    Download    Register    News    Help

Print Thread
#212198 14/05/09 10:00 AM
Joined: May 2009
Posts: 28
B
Ameglian cow
OP Offline
Ameglian cow
B
Joined: May 2009
Posts: 28
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?


Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Search for a bad word script.
A couple of good sites for scripts are Hawkee mIRC Scripts and mIRC.net

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
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.


Link Copied to Clipboard