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

	<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-03-21T19:55:20-04:00</updated>

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

		<entry>
		<author><name><![CDATA[spock]]></name></author>
		<updated>2004-03-21T19:55:20-04:00</updated>

		<published>2004-03-21T19:55:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34842#p34842</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34842#p34842"/>
		<title type="html"><![CDATA[Need a lil help with this tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34842#p34842"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>if {[string equal -nocase $channel "#blacklistchan"]} { return }</code></pre></div>stick that at the top of the procedure<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2369">spock</a> — Sun Mar 21, 2004 7:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-03-21T15:19:15-04:00</updated>

		<published>2004-03-21T15:19:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34837#p34837</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34837#p34837"/>
		<title type="html"><![CDATA[Need a lil help with this tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34837#p34837"><![CDATA[
Thanks guys! But one more thing  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"> <br>Is it possible to "blacklist" one channel, so the bot does not check just that channel, but all the other channels the bot is in?<p>Statistics: Posted by Guest — Sun Mar 21, 2004 3:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2004-03-21T14:58:28-04:00</updated>

		<published>2004-03-21T14:58:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34834#p34834</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34834#p34834"/>
		<title type="html"><![CDATA[Need a lil help with this tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34834#p34834"><![CDATA[
<blockquote class="uncited"><div>string match will NEVER EVER IN A MILLION YEARS return -1</div></blockquote>heh... wanna bet? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"><br><div class="codebox"><p>Code: </p><pre><code>proc string {args} {return -1}</code></pre></div><br>edit: naaah *donk* <img src="http://www.kingmatze.de/images/smiles/wall.gif" class="postimage" alt="Image"> loaded this script for testing and now i just wondered why my scripts were producing one error after another...<br>/me slaps himself and goes to bed... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2617">arcane</a> — Sun Mar 21, 2004 2:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Rusher2K]]></name></author>
		<updated>2004-03-21T13:47:42-04:00</updated>

		<published>2004-03-21T13:47:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34829#p34829</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34829#p34829"/>
		<title type="html"><![CDATA[Need a lil help with this tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34829#p34829"><![CDATA[
strikelight good idea <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>In future I read an entire thread before replying.<br> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3034">Rusher2K</a> — Sun Mar 21, 2004 1:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-03-21T13:36:02-04:00</updated>

		<published>2004-03-21T13:36:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34826#p34826</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34826#p34826"/>
		<title type="html"><![CDATA[Need a lil help with this tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34826#p34826"><![CDATA[
<blockquote class="uncited"><div>I had only see :<blockquote class="uncited"><div> <br>Useful script you got there! But is it possible to change the "mainchan" part so it instead checks all the channels the bot is in, and not just one channel? I'm kind of new to tcl, so i'm very thankful if somebody could tell me how to do this. </div></blockquote> </div></blockquote>Then maybe you should read an entire thread before replying.... Just a thought.<br><blockquote class="uncited"><div>Now the fixed code:<div class="codebox"><p>Code: </p><pre><code>set relaychan "#relay" set word "keywordhere" bind pubm - "*" relay_pubm proc relay_pubm {nick host handle channel text} {     if {[string match -nocase "*$::word*" $text] == 1} {         putserv "PRIVMSG $::relaychan :($channel) $nick: $text"     } }</code></pre></div></div></blockquote>As previously mentioned with the original fix.... <br>you can make it just:<div class="codebox"><p>Code: </p><pre><code>if {[string match -nocase "*$::word*" $text]} {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Mar 21, 2004 1:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Rusher2K]]></name></author>
		<updated>2004-03-21T05:49:11-04:00</updated>

		<published>2004-03-21T05:49:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34822#p34822</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34822#p34822"/>
		<title type="html"><![CDATA[Need a lil help with this tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34822#p34822"><![CDATA[
I had only see :<blockquote class="uncited"><div> <br>Useful script you got there! But is it possible to change the "mainchan" part so it instead checks all the channels the bot is in, and not just one channel? I'm kind of new to tcl, so i'm very thankful if somebody could tell me how to do this. </div></blockquote> <br><br>Now the fixed code:<div class="codebox"><p>Code: </p><pre><code>set relaychan "#relay" set word "keywordhere" bind pubm - "*" relay_pubm proc relay_pubm {nick host handle channel text} {     if {[string match -nocase "*$::word*" $text] == 1} {         putserv "PRIVMSG $::relaychan :($channel) $nick: $text"     } }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3034">Rusher2K</a> — Sun Mar 21, 2004 5:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-03-21T05:25:41-04:00</updated>

		<published>2004-03-21T05:25:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34821#p34821</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34821#p34821"/>
		<title type="html"><![CDATA[Need a lil help with this tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34821#p34821"><![CDATA[
<blockquote class="uncited"><div>tweaKey here:<br><div class="codebox"><p>Code: </p><pre><code>set relaychan "#relay" set word "keywordhere" bind pubm - "*" relay_pubm proc relay_pubm {nick host handle channel text} {     if {[string match -nocase "*$::word*" $text] != -1} {         putserv "PRIVMSG $::relaychan :($channel) $nick: $text"     } }</code></pre></div></div></blockquote>Heh... oy... again with the same bug as previously mentioned...<br>string match will NEVER EVER IN A MILLION YEARS return -1, thus making the comparison ALWAYS TRUE... heh....<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Mar 21, 2004 5:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Rusher2K]]></name></author>
		<updated>2004-03-21T04:36:58-04:00</updated>

		<published>2004-03-21T04:36:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34819#p34819</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34819#p34819"/>
		<title type="html"><![CDATA[Need a lil help with this tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34819#p34819"><![CDATA[
tweaKey here:<br><div class="codebox"><p>Code: </p><pre><code>set relaychan "#relay" set word "keywordhere" bind pubm - "*" relay_pubm proc relay_pubm {nick host handle channel text} {     if {[string match -nocase "*$::word*" $text] != -1} {         putserv "PRIVMSG $::relaychan :($channel) $nick: $text"     } }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3034">Rusher2K</a> — Sun Mar 21, 2004 4:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-03-20T20:04:58-04:00</updated>

		<published>2004-03-20T20:04:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34816#p34816</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34816#p34816"/>
		<title type="html"><![CDATA[Need a lil help with this tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34816#p34816"><![CDATA[
Useful script you got there! But is it possible to change the "mainchan" part so it instead checks all the channels the bot is in, and not just one channel? I'm kind of new to tcl, so i'm very thankful if somebody could tell me how to do this.  <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 Guest — Sat Mar 20, 2004 8:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2004-03-07T11:03:16-04:00</updated>

		<published>2004-03-07T11:03:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34329#p34329</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34329#p34329"/>
		<title type="html"><![CDATA[Need a lil help with this tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34329#p34329"><![CDATA[
<blockquote class="uncited"><div>That would be because <strong class="text-strong">string match</strong> never returns -1...</div></blockquote>oops <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> lsearch returns -1... my fault.<br><br>to change use it for multiple words you should work with lists.<br>set words {"word1" "word2" "word3"}<br>and then:<br>foreach word $words {<br>if string match *$word* $text<br>}<br>this should give you the idea.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2617">arcane</a> — Sun Mar 07, 2004 11:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cvanmeer]]></name></author>
		<updated>2004-03-07T05:16:57-04:00</updated>

		<published>2004-03-07T05:16:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34320#p34320</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34320#p34320"/>
		<title type="html"><![CDATA[Need a lil help with this tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34320#p34320"><![CDATA[
what would you have to change in this script to respond to multiple words?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4215">cvanmeer</a> — Sun Mar 07, 2004 5:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[XceL]]></name></author>
		<updated>2004-03-06T16:37:28-04:00</updated>

		<published>2004-03-06T16:37:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34309#p34309</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34309#p34309"/>
		<title type="html"><![CDATA[Need a lil help with this tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34309#p34309"><![CDATA[
that worked, thanks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4402">XceL</a> — Sat Mar 06, 2004 4:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-03-06T15:19:13-04:00</updated>

		<published>2004-03-06T15:19:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34305#p34305</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34305#p34305"/>
		<title type="html"><![CDATA[Need a lil help with this tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34305#p34305"><![CDATA[
That would be because <strong class="text-strong">string match</strong> never returns -1...<br><br>change <div class="codebox"><p>Code: </p><pre><code>if {[string match -nocase "*$::word*" $text] != -1} { </code></pre></div>to<div class="codebox"><p>Code: </p><pre><code>if {[string match -nocase "*$::word*" $text]} { </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sat Mar 06, 2004 3:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[XceL]]></name></author>
		<updated>2004-03-06T08:25:15-04:00</updated>

		<published>2004-03-06T08:25:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34299#p34299</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34299#p34299"/>
		<title type="html"><![CDATA[Need a lil help with this tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34299#p34299"><![CDATA[
nope still didnt work, no matter what i typed it sent it to the relay channel..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4402">XceL</a> — Sat Mar 06, 2004 8:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2004-03-06T07:40:19-04:00</updated>

		<published>2004-03-06T07:40:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=34296#p34296</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=34296#p34296"/>
		<title type="html"><![CDATA[Need a lil help with this tcl script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=34296#p34296"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set mainchan "#main" set relaychan "#relay" set word "keywordhere" bind pubm - "*" relay_pubm proc relay_pubm {nick host handle channel text} {    if {[strlwr $channel] != [strlwr $::mainchan]} { return }    if {[string match -nocase "*$::word*" $text] != -1} {        putserv "PRIVMSG $::relaychan :($channel) $nick: $text"    } }</code></pre></div>should work (not tested).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2617">arcane</a> — Sat Mar 06, 2004 7:40 am</p><hr />
]]></content>
	</entry>
	</feed>
