mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2006
Posts: 9
Y
yayah1 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Y
Joined: Feb 2006
Posts: 9
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

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
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

Joined: Feb 2006
Posts: 9
Y
yayah1 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Y
Joined: Feb 2006
Posts: 9
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

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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.


Gone.
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
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

Joined: Feb 2006
Posts: 9
Y
yayah1 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Y
Joined: Feb 2006
Posts: 9
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


Link Copied to Clipboard