mIRC Home    About    Download    Register    News    Help

Print Thread
swear.words list #107808
13/01/05 08:38 AM
13/01/05 08:38 AM
Joined: Jan 2005
Posts: 59
C
confuzzed Offline OP
Babel fish
confuzzed  Offline OP
Babel fish
C

Joined: Jan 2005
Posts: 59
ok i figure sincet i got the help on getting the code to wortk and it does i should start a new topic for this i would like to know if i can make some sort of .ini/mrc file for all the swear words because i have a large list that it wont take now here is the code for the warn/ban bot
Code:
alias swear {
  return [censored] [censored]
}


on @*:TEXT:*:#: {  

  if ($nick !isop #) {    

    var %i = 0    

    while (%i < $numtok(%swear.words,32)) {      

      inc %i     

      var %current.word = $gettok(%swear.words,%i,32) {        

        if ($istok($strip($1-),%current.word,32) == $true) {

          set -u3600 %rl. [ $+ [ $address($nick,2) ] ] $calc( %rl. [ $+ [ $address($nick,2) ] ] + 1)

          if (%rl. [ $+ [ $address($nick,2) ] ] == 1) { 

            notice $nick Please don't swear! - this is your first warning! 

          }

          if (%rl. [ $+ [ $address($nick,2) ] ] == 2) { 

            notice $nick Please don't swear! - this is your second warning next time you will be banned! 

          }        

          if (%rl. [ $+ [ $address($nick,2) ] ] >= 3)  {           
            ban -k $chan $nick 2 Banned for $duration($duration(24 hrs)) --> $ifmatch <--   

          }  

        }  

      }  

    }  

  }  

}

all help is apreciated

Last edited by confuzzed; 13/01/05 08:39 AM.
Re: swear.words list #107809
13/01/05 09:02 AM
13/01/05 09:02 AM
Joined: Aug 2003
Posts: 314
S
Sigh Offline
Fjord artisan
Sigh  Offline
Fjord artisan
S

Joined: Aug 2003
Posts: 314
If you think a text file would be easiest for you to handle the list of words in then you can use the following text event:

Code:
on @*:text:*:#:{
  if ($nick !isop #) {
    if ($read([color:brown]file.txt[/color],rn,/^(\Q $+ $replacecs($1-,\E,\E\\E\Q,$chr(32),\E|\Q) $+ \E)$/iS)) {
      var %s = $+(%,$cid,$site,#)
      inc -u3600 $(%s)
      if ($(%s,2) < 3) .notice $nick Please don't swear! - $iif($v1 = 1,this is your first warning!,this is your second warning next time you will be banned!)
      else ban -k # $nick 2 Banned for 1day
    }
  }
}


Change file.txt to the name/path of the file containing the swears, each swear on a new line

Re: swear.words list #107810
13/01/05 09:13 AM
13/01/05 09:13 AM
Joined: Jan 2005
Posts: 59
C
confuzzed Offline OP
Babel fish
confuzzed  Offline OP
Babel fish
C

Joined: Jan 2005
Posts: 59
theres no way for me to keep the code i have now and intergrate the .txt file in?

Re: swear.words list #107811
14/01/05 03:09 AM
14/01/05 03:09 AM
Joined: Jan 2005
Posts: 59
C
confuzzed Offline OP
Babel fish
confuzzed  Offline OP
Babel fish
C

Joined: Jan 2005
Posts: 59
no one can help me : ' (

Re: swear.words list #107812
14/01/05 05:40 AM
14/01/05 05:40 AM
Joined: Jan 2005
Posts: 59
C
confuzzed Offline OP
Babel fish
confuzzed  Offline OP
Babel fish
C

Joined: Jan 2005
Posts: 59
ok well i dont mean to triple post but i wanted to say i tried the code posted above but it did nothing and i mad a file.txt for it so i wouldnt have to goto the trouble of changeing that part of the code but it didnt do anything after swearing. and yes i added swear words to the file.txt file

Re: swear.words list #107813
14/01/05 05:56 AM
14/01/05 05:56 AM
Joined: Dec 2002
Posts: 3,547
Kent, England
S
SladeKraven Offline
Hoopy frood
SladeKraven  Offline
Hoopy frood
S

Joined: Dec 2002
Posts: 3,547
Kent, England
I'm not sure whether this would work, like FiberOPtics I'm going to blame this on too many late nights. wink

Put all the profanities on one line of the file swear.txt.

Code:
on @*:TEXT:*:#: {     
  if ($nick !isop #) {   
    var %i = 0       
    while (%i < $numtok($read(swear.txt,1),32)) {      
      inc %i              
      var %current.word = $gettok($read(swear.txt,1),%i,32) {                
        if ($istok($strip($1-),%current.word,32) == $true) {        
          set -u3600 %rl. [ $+ [ $address($nick,2) ] ] $calc( %rl. [ $+ [ $address($nick,2) ] ] + 1)   
          if (%rl. [ $+ [ $address($nick,2) ] ] == 1) {             
            notice $nick Please don't! - this is your first warning!    
          }          
          if (%rl. [ $+ [ $address($nick,2) ] ] == 2) {                
            notice $nick Please don't! - this is your second warning next time you will be banned!     
          }      
          if (%rl. [ $+ [ $address($nick,2) ] ] >= 3)  {           
            ban -k $chan $nick 2 Banned for $duration($duration(24 hrs)) --> $ifmatch <--    
          }          
        }        
      }     
    }    
  }
}

Re: swear.words list #107814
14/01/05 06:23 AM
14/01/05 06:23 AM
Joined: Jan 2005
Posts: 59
C
confuzzed Offline OP
Babel fish
confuzzed  Offline OP
Babel fish
C

Joined: Jan 2005
Posts: 59
YAY it worked *does happy dance* i realy appreciate it slade comes to save thew day agiain YAY works great man i still couldnt use my whole list but i got a good amount up there and alot more then i could befor and im happy YAY *bows befor o great mighty slade* YAY

Re: swear.words list #107815
14/01/05 06:25 AM
14/01/05 06:25 AM
Joined: Dec 2002
Posts: 3,547
Kent, England
S
SladeKraven Offline
Hoopy frood
SladeKraven  Offline
Hoopy frood
S

Joined: Dec 2002
Posts: 3,547
Kent, England
You're welcome man lol.. grin

Re: swear.words list #107816
01/02/05 12:17 PM
01/02/05 12:17 PM
Joined: Feb 2005
Posts: 1
H
Hendrik_ Offline
Mostly harmless
Hendrik_  Offline
Mostly harmless
H

Joined: Feb 2005
Posts: 1
I'm having kinda the same problem, but I want to kick a person also when he has more than 1 bad word in a sentense.
example: when someone says: "Hello lame f*ckers", I want to kick the person, but only because he sayd "lame f*ckers", not only 'f*ckers' itself.
I hope someone can help me smile

Best Regards,
Hendrik

Edit:
Quote:

on @*:TEXT:*:#l: {
if ($nick !isop #) {
var %i = 0
while (%i < $numtok($read(words.txt,ii1),124)) {
inc %i
var %current.word = $gettok($read(words.txt,1),%i,124) {
//echo -a %current.word
if ($istok($strip($1-),%current.word,124) == $true) {
/msg $chan fout!
//echo -a %current.word
var %cal2 = $readini(stats.ini, mainstats, %current.word)
var %cal = $calc(%cal2 + 1)
/writeini stats.ini mainstats %current.word %cal
goto end
}
}
}
}
:end
}
}


This is how i c/p your script you gave 2 posts up here (ty for that btw smile), what do i have to edit to make it work like i want it to?

Last edited by Hendrik_; 01/02/05 01:38 PM.
Re: swear.words list #107817
23/02/05 06:00 PM
23/02/05 06:00 PM
Joined: Feb 2005
Posts: 40
england with no lions & tigers
xolademoness Offline
Ameglian cow
xolademoness  Offline
Ameglian cow

Joined: Feb 2005
Posts: 40
england with no lions & tigers
I agree with the last post


..people who make scripts that ban people just for using swear words no matter the context just need to get a life.

Re: swear.words list #107818
23/02/05 06:17 PM
23/02/05 06:17 PM
Joined: Dec 2002
Posts: 3,547
Kent, England
S
SladeKraven Offline
Hoopy frood
SladeKraven  Offline
Hoopy frood
S

Joined: Dec 2002
Posts: 3,547
Kent, England
What do you mean?

Re: swear.words list #107819
23/03/05 12:36 PM
23/03/05 12:36 PM
Joined: Nov 2004
Posts: 21
D
di_mis Offline
Ameglian cow
di_mis  Offline
Ameglian cow
D

Joined: Nov 2004
Posts: 21
How can i make this code to work with wildcards
example : *shi* *f*ck* ..etc
on @*:TEXT:*:#: {
if ($nick !isop #) {
var %i = 0
while (%i < $numtok($read(swear.txt,1),32)) {
inc %i
var %current.word = $gettok($read(swear.txt,1),%i,32) {
if ($istok($strip($1-),%current.word,32) == $true) {
set -u3600 %rl. [ $+ [ $address($nick,2) ] ] $calc( %rl. [ $+ [ $address($nick,2) ] ] + 1)
if (%rl. [ $+ [ $address($nick,2) ] ] == 1) {
notice $nick Please don't! - this is your first warning!
}
if (%rl. [ $+ [ $address($nick,2) ] ] == 2) {
notice $nick Please don't! - this is your second warning next time you will be banned!
}
if (%rl. [ $+ [ $address($nick,2) ] ] >= 3) {
ban -k $chan $nick 2 Banned for $duration($duration(24 hrs)) --> $ifmatch <--
}
}
}
}
}
}

Re: swear.words list #107820
10/04/05 07:54 AM
10/04/05 07:54 AM
Joined: Apr 2005
Posts: 3
West Yorkshire, Uk, Nr Earth
T
T1Cybernetic Offline
Self-satisified door
T1Cybernetic  Offline
Self-satisified door
T

Joined: Apr 2005
Posts: 3
West Yorkshire, Uk, Nr Earth
Quote:
I'm not sure whether this would work, like FiberOPtics I'm going to blame this on too many late nights. wink

Put all the profanities on one line of the file swear.txt.

Code:
on @*:TEXT:*:#: {     
  if ($nick !isop #) {   
    var %i = 0       
    while (%i &lt; $numtok($read(swear.txt,1),32)) {      
      inc %i              
      var %current.word = $gettok($read(swear.txt,1),%i,32) {                
        if ($istok($strip($1-),%current.word,32) == $true) {        
          set -u3600 %rl. [ $+ [ $address($nick,2) ] ] $calc( %rl. [ $+ [ $address($nick,2) ] ] + 1)   
          if (%rl. [ $+ [ $address($nick,2) ] ] == 1) {             
            notice $nick Please don't! - this is your first warning!    
          }          
          if (%rl. [ $+ [ $address($nick,2) ] ] == 2) {                
            notice $nick Please don't! - this is your second warning next time you will be banned!     
          }      
          if (%rl. [ $+ [ $address($nick,2) ] ] &gt;= 3)  {           
            ban -k $chan $nick 2 Banned for $duration($duration(24 hrs)) --&gt; $ifmatch &lt;--    
          }          
        }        
      }     
    }    
  }
}


My first post and my first search found exactly what i was looking for, smile.

Thanks for the great info!


Now, water can flow or it can crash. Be water, my friend. (Bruce Lee)
Re: swear.words list #107821
10/04/05 02:40 PM
10/04/05 02:40 PM
Joined: Dec 2002
Posts: 3,547
Kent, England
S
SladeKraven Offline
Hoopy frood
SladeKraven  Offline
Hoopy frood
S

Joined: Dec 2002
Posts: 3,547
Kent, England
You're welcome. smile lol.

Re: swear.words list #107822
11/04/05 03:11 AM
11/04/05 03:11 AM
Joined: Dec 2002
Posts: 1,321
Georgia, USA
H
Hammer Offline
Hoopy frood
Hammer  Offline
Hoopy frood
H

Joined: Dec 2002
Posts: 1,321
Georgia, USA
on $*:TEXT:/(lame|duck|shoot|dang|drats)/iS:#: if ($regml(0) > 1) ban -ku60 # $nick 2 U Sware 2 much!

wink


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Re: swear.words list #107823
05/12/05 12:35 PM
05/12/05 12:35 PM
Joined: Sep 2005
Posts: 5
South-Africa
S
SonnyZA Offline
Nutrimatic drinks dispenser
SonnyZA  Offline
Nutrimatic drinks dispenser
S

Joined: Sep 2005
Posts: 5
South-Africa
i've searched and got this very fast. thnx smile

Is there a way the i can use a type of *swearword* style of looking up? What i mean, lets say this is the swearword ---> dung

now, without putting all the varaints of dung, like dungface, dunger etc. how can I pick up that swear word?

Hope I explained it properly laugh

Re: swear.words list [Re: SladeKraven] #261087
28/07/17 07:35 PM
28/07/17 07:35 PM
Joined: Jul 2017
Posts: 2
S
scoot Offline
Bowl of petunias
scoot  Offline
Bowl of petunias
S

Joined: Jul 2017
Posts: 2
one little problem line 4
* /while: '<' unknown operator (line 4, swear.mrc)
not sure why it only posts as < but its '& l t ;'

Last edited by scoot; 28/07/17 07:39 PM.
Re: swear.words list [Re: scoot] #261089
29/07/17 12:28 AM
29/07/17 12:28 AM
Joined: Jan 2004
Posts: 1,158
maroon Offline
Hoopy frood
maroon  Offline
Hoopy frood

Joined: Jan 2004
Posts: 1,158
the line should be in your script with the 1-character less-than symbol (alt-40) and not the 4-character html code beginning with the ampersand. I do not see an error in the code.

Re: swear.words list [Re: maroon] #261090
29/07/17 03:24 AM
29/07/17 03:24 AM
Joined: Jul 2017
Posts: 2
S
scoot Offline
Bowl of petunias
scoot  Offline
Bowl of petunias
S

Joined: Jul 2017
Posts: 2
Ill take a look Thanks for the reply :)))