egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Megahal - how to filter badwords ?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
b34r
Voice


Joined: 18 Jun 2003
Posts: 35

PostPosted: Tue Feb 17, 2004 5:45 am    Post subject: Megahal - how to filter badwords ? Reply with quote

Hi...
I'm currently trying to create a script that filters out bad words, but i'm a bit out of ideas how to do it.
Something like this for starters:
Code:

bind pubm - "* $nick*" megahal:filter
setudef flag megahfilt

proc megahal:filter {nick uhost hand chan text} {

   if {[lsearch -exact [channel info $chan] +megahfilt] != -1} {
   } else { return 0 }

   set filtered [filterproc text]
   learn $filtered
   set reply [filterproc [getreply $filtered]]
   puthelp "PRIVMSG $chan :$nick\: $reply"
}

So you see, the filterproc is what i need. But how?
It needs to filter both input and output, my megahal.brn-file is already filled with profanity Confused
* Strict: Put the words in a file ? ( badword|niceword )
* Random out of a few: Put the words in a file ? ( badword|niceword|niceword2|niceword3 )
* Read any random word from a file ?

What would be the nicest way to do it ?

Or maybe there is such a script somewhere already that i haven't found ?
Or even BarkerJr himself would like to code that into the module Wink
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber