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

	<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>2012-05-21T10:04:48-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-05-21T07:26:44-04:00</updated>

		<published>2012-05-21T07:26:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99439#p99439</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99439#p99439"/>
		<title type="html"><![CDATA[[SOLVED] badword TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99439#p99439"><![CDATA[
There are at least two ways to make this work. First method would be to replace:<div class="codebox"><p>Code: </p><pre><code>   if { $bwChan != $channel } {      return 0   }</code></pre></div>with:<div class="codebox"><p>Code: </p><pre><code>   if {[lsearch -nocase $bwChan $channel] == -1} {      return 0   }</code></pre></div>Con: You would have to edit the tcl file every time you wish to add/remove a channel from the list.<br><br>The second method involves the removal of the same line like mentioned above and replacing it with:<div class="codebox"><p>Code: </p><pre><code>   if {![channel get $channel badword]} {      return 0   }</code></pre></div>and replacing:<div class="codebox"><p>Code: </p><pre><code>set bwChan "#chan"</code></pre></div>with:<div class="codebox"><p>Code: </p><pre><code>setudef flag badword</code></pre></div>Then, to enable/disable it on a channel it's a simple command on DCC chat or telnet with the bot: .chanset #channel +/-badword<br><br>if you decide to stick with the first method and want this work on all channels when the bwChan is set to "" then replace we change that line with:<div class="codebox"><p>Code: </p><pre><code>if {[llength $bwChan]} {   if {![channel get $channel badword]} {      return 0   }}</code></pre></div>As for the second case, you just need to .chanset * +/-badword<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon May 21, 2012 7:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[gasak]]></name></author>
		<updated>2012-05-21T10:04:48-04:00</updated>

		<published>2012-05-21T00:38:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99437#p99437</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99437#p99437"/>
		<title type="html"><![CDATA[[SOLVED] badword TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99437#p99437"><![CDATA[
I got this badword TCL somewhere else, and it suits to my need:<br><div class="codebox"><p>Code: </p><pre><code>set bwRun 1set bwArray() ""set bwNumber 0set bwFilename "filename.txt"set bwChan "#chan"# SURVEYpub procbind pubm - * bwSurveypubproc bwSurveypub {nick uhost hand channel args} {global bwChan bwArray bwNumber bwRun passLogoset channel [string tolower $channel]if { $bwChan != $channel } {return 0}if { ([isop $nick $bwChan])||([matchattr $nick o|o $bwChan])||([isvoice $nick $bwChan]) } {return 0}set args [join $args]set args [string tolower $args]for {set i 0} {$i &lt; $bwNumber} {incr i} {if { $bwArray($i) != "" } {set badw [join $bwArray($i)]set dummy ""if { [regsub -all "$badw" $args "" dummy] } {putserv "MODE $channel +b $uhost"putserv "KICK $bwChan $nick :Badword detected from '$badw' get out!"}}}return 0}</code></pre></div>The problem i got here is that it just working only in one channel. I try to put several channel like <br><div class="codebox"><p>Code: </p><pre><code>set bwChan "#chan1 #chan2"</code></pre></div>But its only recognize the first channel which is #chan1<br><br>What i need is it should work on every channel that i put on <strong class="text-strong">set bwChan</strong> and also will work in all channel when i leave the <strong class="text-strong">set bwChan</strong> to """"<br><br>Please help me on this thing. Thank you very much.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11310">gasak</a> — Mon May 21, 2012 12:38 am</p><hr />
]]></content>
	</entry>
	</feed>
