Skip to content
MSN

badword kicker

A TG007 community discussion started by oosho.

Discussion 12 posts
Page 1 of 1
Open
Topic #6598 · 12 published posts · 1,272 views

i want the badword kicker to kick only normal users and hosts but not me

here is the code that i am using

on *:TEXT:badword:#: { kick # $nick $nick you have been kicked for messbehaviour(6) }


and i want another one that only kicks normal users

on *:TEXT:*:#:{
var %s = $numtok($1-,32), %x = 1
while (%x <= %s) {
var %w = $+(*,$gettok($1-,%x,32),*), %wo = $read(badwords.txt,w,%w)
if (%w == %wo) { .kick $chan $nick $nick you have been kicked for messbehaviour(6) }
inc %x 
}
}
menu channel {
-
Edit Bad Words:/run badwords.txt
-
}

 

There is something simple for you. I didnt take the time to test it so I dono if it'll work, though I've used it a few times before.

Edited May 10, 2006 4:58 PM by LAS

not working LAS :( :(

A simple one for example :)

on @*:text:*:#:{
 var %n = $nick, %c = $chan
 if (%n == $me) return
 if (%n isop %c) halt
 var %v = $strip($1-)
   if ($regex(%v,/(flower|slut\.|\flowering)/)) { 
     kick %c %n :no badwords please :)
   }
 }

This kicks only normal users

 

on @*:text:*:#:{
 var %n = $nick, %c = $chan
 if (%n == $me) return
 var %v = $strip($1-)
   if ($regex(%v,/(flower|slut\.|\flowering)/)) { 
     kick %c %n :no badwords please :)
   }
 }

 

This kicks normal users and hosts

 

 

There is nothing so absurd but some philosopher has said it

if ($regex(%v,/(flower|slut\.|\flowering)/)) {

 

can i set that regex to read the words i need from a file ?!

on ^*:text:*:#: {
 var %x = $numtok(%badword,32)
 while (%x) {
   if ($matchtok($1-,$gettok(%badword,%x,32),1,32)) kick $chan $nick Profanity isnt allowed - * $+ $right($gettok(%badword,%x,32),-1)
   dec %x
 }
}
menu * {
Add bad word: set %badword %badword $$?="Enter word to kick for"
}

 

Definently works just tested it. Load it into a remote then click 'Add bad word'.

Edited May 11, 2006 12:14 AM by Gazzy

ya Gazzy it works, but it still kicks me :D i want it not to kick me :D

 

and Cryton i've tried yours but seems i don't understand where to but the bad words

 

i tried to change if ($regex(%v,/(flower|slut\.|\flowering)/)) {

 

to if ($regex(%v,/(flower|whore\.|\flowering)/)) {

 

but nothing happens when anybody say any of them

It should kick anyhow :).Thats tg they just filter the bad words anyhow its good thing made by tg ;) .

 

if ($regex(%v,/(addword|addword\|\addword)/)) { 

 

where ever there is addword please replace with your custom word.

Edited May 11, 2006 11:36 AM by Cryton

 

 

There is nothing so absurd but some philosopher has said it

thanx cryton really thanx

i'm sorry that i didn't understant the code the first time, i am still a newbie :P hope i will be expert someday

i won't give up :D

 

Ohhh, damn sorry, i just added a little code to read from a .ini file, click 'add protected user' in 'badword' on the nicklist... you can add 'if ($readini(protect.ini,protect,$address($nick,1))) return' or something similar to any other codes that you don't want to kick specific users for..

 

on ^*:text:*:#: {
 if ($readini(protect.ini,protect,$address($nick,1))) return
 var %x = $numtok(%badword,32)
 while (%x) {
   if ($matchtok($1-,$gettok(%badword,%x,32),1,32)) kick $chan $nick Profanity isnt allowed - * $+ $right($gettok(%badword,%x,32),-1)
   dec %x
 }
}
menu nicklist {
 Badword
 .Add bad word: set %badword %badword $$?="Enter word to kick for"
 .Add protected user:writeini protect.ini protect $address($1,1) $address($1,1)
 .Remove protected user:remini protect.ini protect $address($1,1)
}

THANX GAZZY now taht't what i am talkin about :D

My pleasure:p