<?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/3150" />

	<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>2002-12-01T18:46:06-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-12-01T18:46:06-04:00</updated>

		<published>2002-12-01T18:46:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=13856#p13856</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=13856#p13856"/>
		<title type="html"><![CDATA[How can i exclude channels and use the badword in a sentence]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=13856#p13856"><![CDATA[
to exclude it from channels you could make a list and then do a check each time something is said and check if it is a chan you want it to be excluded from... but intstead you could just add a <div class="codebox"><p>Code: </p><pre><code>bind pubm - "#chan1 *" checkword bind pubm - "#chan2 *" checkword</code></pre></div>etc... then you specify which channels you want it to monitor.<br><br>to get the bad word I would use lsearch instead of string match, when doing lsearch you get the position of the first matching variable in a list, this way you could just pull out the word by using lindex<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Sun Dec 01, 2002 6:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-12-01T17:32:52-04:00</updated>

		<published>2002-12-01T17:32:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=13855#p13855</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=13855#p13855"/>
		<title type="html"><![CDATA[How can i exclude channels and use the badword in a sentence]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=13855#p13855"><![CDATA[
Hi there,<br><br>i've been able to get the following script working for identifying badword. The only thing i can't seem to get working is how to have this badword check been excluded from other channels. For instance this script should run in Cybercafe and 30+ but not in Sexroom:<br><br>What i also would like to do is be able to have the badword in a string so that when the bot reply's: That's quite a naughty word, it also mentions the badword so the sentence would be like: $badword , that's quite a naughty word. I know $n is showing me the badword but it still shows the * that are around the badword.<br><br>Who can help me... My script is a s follows:<br><br>set badword { <br>lul<br>"lul *"<br>"* lul"<br>"* lul *" <br>} <br>bind pubm - * checkword <br>proc checkword {nick uhost handle chan text} { <br>global badword <br>if (![matchattr $nick +o]) { <br>  foreach n $badword { <br>   if ([string match $n [string tolower $text]]) { <br>    putlog "$nick said bad word in $chan - $n" <br>    putserv "PRIVMSG $chan :\001ACTION says: That's quite a naughty word \001" <br>    return 0 <br>   } <br>  } <br>} <br>}<p>Statistics: Posted by Guest — Sun Dec 01, 2002 5:32 pm</p><hr />
]]></content>
	</entry>
	</feed>
