<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/6876" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2004-02-17T05:45:10-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/6876</id>

		<entry>
		<author><name><![CDATA[b34r]]></name></author>
		<updated>2004-02-17T05:45:10-04:00</updated>

		<published>2004-02-17T05:45:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=33672#p33672</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=33672#p33672"/>
		<title type="html"><![CDATA[Megahal - how to filter badwords ?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=33672#p33672"><![CDATA[
Hi...<br>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.<br>Something like this for starters:<div class="codebox"><p>Code: </p><pre><code>bind pubm - "* $nick*" megahal:filtersetudef flag megahfiltproc megahal:filter {nick uhost hand chan text} {if {[lsearch -exact [channel info $chan] +megahfilt] != -1} {} else { return 0 }set filtered [filterproc text]learn $filteredset reply [filterproc [getreply $filtered]]puthelp "PRIVMSG $chan :$nick\: $reply"}</code></pre></div>So you see, the filterproc is what i need. But how?<br>It needs to filter both input and output, my megahal.brn-file is already filled with profanity  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"> <br>* Strict: Put the words in a file ? ( badword|niceword )<br>* Random out of a few: Put the words in a file ? ( badword|niceword|niceword2|niceword3 )<br>* Read any random word from a file ?<br><br>What would be the nicest way to do it ?<br><br>Or maybe there is such a script somewhere already that i haven't found ?<br>Or even BarkerJr himself would like to code that into the module  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3355">b34r</a> — Tue Feb 17, 2004 5:45 am</p><hr />
]]></content>
	</entry>
	</feed>
