mIRC Homepage

Script for kicking when cussing

Posted By: yayah1

Script for kicking when cussing - 21/03/06 03:05 AM

What do i put to make my bot kick when cussing is done more than 2 times in a sentance? I am guessing this:
Code:
  on *:TEXT:@calc *:#: {
  kick $nick please do not say $word
}


But, i highly doubt that is it lol... well, i am trying as you can see.... please help me...
Thank you

~yayah 1
Posted By: genius_at_work

Re: Script for kicking when cussing - 21/03/06 04:05 AM

You could probably find many existing scripts that will do what you want. Try searching for mIRC scripting sites on google.

Here is a simple code that will catch if someone says 2 or more swears.

Code:
on $*:TEXT:/\b(?:[color:red]ass|bitch|whore|etc[/color])\b/igS:#:if ($regml(0) >= 2) echo 4 -a OMGZ $nick is cussing too much!!


Note, this only catches individual swears, example: the above code would match "ass" but not "[censored]". To change/add words, edit the red portion above. Each word is separated by a | pipe.

-genius_at_work
Posted By: yayah1

Re: Script for kicking when cussing - 21/03/06 08:16 AM

this did not kick the person though... can someone edit it to make it kick them when 2 or more have been said? and on 1 swear word, a warning will be sent to the channel, eg. $nick this is your warning, please do not cuss on this channel.

~yayah 1
Posted By: FiberOPtics

Re: Script for kicking when cussing - 21/03/06 09:38 AM

You can't use a colon : in the regex expression, as colons are used as delimiters in events.

In fact, for your code to work you need to make it capturing, or $regml() won't be filled.
Posted By: genius_at_work

Re: Script for kicking when cussing - 21/03/06 02:52 PM

Code:
on $*:TEXT:/\b(ass|bitch|whore|etc)\b/igS:#:if ($regml(0) >= 2) echo 4 -a OMGZ $nick is cussing too much!!


-genius_at_work
Posted By: yayah1

Re: Script for kicking when cussing - 22/03/06 05:24 AM

this is not working.... i added it and tested it.. i want it to tell $chan that $nick is swearing too much... also, the words would be in the middle of a sentace so can you make it search the sentance? thank you and i hope i get what i am looking for.. It also needs to kick the person for more than 2 swears.

~yayah 1
© 2021 mIRC Discussion Forums