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

	<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-10-17T13:54:19-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Weirdo]]></name></author>
		<updated>2002-10-17T13:54:19-04:00</updated>

		<published>2002-10-17T13:54:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12088#p12088</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12088#p12088"/>
		<title type="html"><![CDATA[DCC File Sends]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12088#p12088"><![CDATA[
Want to know the stupid thing...<br><br>I only just noticed they were the wrong way round <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>I also removed the Second test cause i dont think i need it now that you come to think about it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1195">Weirdo</a> — Thu Oct 17, 2002 1:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2002-10-17T13:19:00-04:00</updated>

		<published>2002-10-17T13:19:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12084#p12084</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12084#p12084"/>
		<title type="html"><![CDATA[DCC File Sends]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12084#p12084"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>bind pub - !rule_send pub:infosendproc pub:infosend { nick host hand chan text} {global runchan infofileif {$chan != $runchan || {onchan $runchan $nick} == 0 } {return 0}dccsend $infofile $nick}</code></pre></div>And believe it or not.....<br><blockquote class="uncited"><div>[18:03:26] &lt;Minako&gt; [18:03] Begin DCC send info.txt to Weirdo<br>[18:03:29] &lt;Minako&gt; [18:03] Finished dcc send info.txt to Weirdo</div></blockquote>It works<br><br>So why is it that the first expression shouldnt be in brackets, yet the second one does? Not sure i quite undertsand that</div></blockquote>1. $chan != $runchan, tcl substitutes the actual values of $chan and $runchan and then evaluates the "!="<br><br>2. {onchan $runchan $nick} == 0, is still wrong. putting it like that will make it a string with the value "onchan $runchan $nick". The variables are not substituted. And that string is tested against == 0, which will always result in 0. <br><br>You MUST remove the { } and you MUST put [ ] around it if you want to use it as a command.<br><br>And once again: you MUST SWAP $runchan and $nick in the onchan command if you really really want to use that test.<br><br>And once again: do you really NEED this test?<br><br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_evil.gif" width="15" height="15" alt=":evil:" title="Evil or Very Mad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Thu Oct 17, 2002 1:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Weirdo]]></name></author>
		<updated>2002-10-17T13:02:43-04:00</updated>

		<published>2002-10-17T13:02:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12083#p12083</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12083#p12083"/>
		<title type="html"><![CDATA[DCC File Sends]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12083#p12083"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub - !rule_send pub:infosendproc pub:infosend { nick host hand chan text} {global runchan infofileif {$chan != $runchan || {onchan $runchan $nick} == 0 } {return 0}dccsend $infofile $nick}</code></pre></div>And believe it or not.....<br><blockquote class="uncited"><div>[18:03:26] &lt;Minako&gt; [18:03] Begin DCC send info.txt to Weirdo<br>[18:03:29] &lt;Minako&gt; [18:03] Finished dcc send info.txt to Weirdo</div></blockquote>It works<br><br>So why is it that the first expression shouldnt be in brackets, yet the second one does? Not sure i quite undertsand that<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1195">Weirdo</a> — Thu Oct 17, 2002 1:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2002-10-17T13:04:11-04:00</updated>

		<published>2002-10-17T12:58:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12082#p12082</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12082#p12082"/>
		<title type="html"><![CDATA[DCC File Sends]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12082#p12082"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>if {{$chan == $runchan} || {onchan $runchan $nick} == 0 } {return 0}</code></pre></div>[17:53:44] &lt;Minako&gt; [17:53] Tcl error [pub:infosend]: expected boolean value but got "$chan != $runchan"<br><br><br> onchan &lt;nickname&gt; [channel]<br>    Returns: 1 if someone by that nickname is on the specified channel (or<br>      any channel if none is specified); 0 otherwise<br>    Module: irc<br><br>Have i got the right usage of this, as if its 0, then the proc will stop, if its 1 then itll continue. Does the channel need to be specified in the onchan?<br><br>Cause of this boolean thingy, havent got a reading for the second run chan[/code]</div></blockquote>Hmm, stereo was not good enough <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>1. ==&gt; {$chan == $runchan} <br>Do not put { } around it.<br><br>2. {onchan $runchan $nick}<br>put [ ] around this, since [onchan] is a command that returns something (0 or 1).<br><br>3. You write:<br><br>onchan $runchan $nick<br><br>and tcl-commands.doc writes:<br><br>onchan &lt;nickname&gt; [channel].<br><br>You see the difference in the order/location of the nickname and the channelname?<br><br>4. Even if you use the [onchan] correctly, are you sure this test is needed?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Thu Oct 17, 2002 12:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Weirdo]]></name></author>
		<updated>2002-10-17T12:56:02-04:00</updated>

		<published>2002-10-17T12:56:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12081#p12081</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12081#p12081"/>
		<title type="html"><![CDATA[DCC File Sends]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12081#p12081"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>if {{$chan == $runchan} || {onchan $runchan $nick} == 0 } {return 0}</code></pre></div>[17:53:44] &lt;Minako&gt; [17:53] Tcl error [pub:infosend]: expected boolean value but got "$chan != $runchan"<br><br><br> onchan &lt;nickname&gt; [channel]<br>    Returns: 1 if someone by that nickname is on the specified channel (or<br>      any channel if none is specified); 0 otherwise<br>    Module: irc<br><br>Have i got the right usage of this, as if its 0, then the proc will stop, if its 1 then itll continue. Does the channel need to be specified in the onchan?<br><br>Cause of this boolean thingy, havent got a reading for the second run chan[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1195">Weirdo</a> — Thu Oct 17, 2002 12:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2002-10-17T12:20:30-04:00</updated>

		<published>2002-10-17T12:20:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12080#p12080</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12080#p12080"/>
		<title type="html"><![CDATA[DCC File Sends]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12080#p12080"><![CDATA[
<blockquote class="uncited"><div>[edit] Doh ... just too late.</div></blockquote>He now gets the message in stereo <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Thu Oct 17, 2002 12:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Photon]]></name></author>
		<updated>2002-10-17T12:09:12-04:00</updated>

		<published>2002-10-17T12:09:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12078#p12078</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12078#p12078"/>
		<title type="html"><![CDATA[DCC File Sends]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12078#p12078"><![CDATA[
if {[$chan != $runchan] <br><br>doesnt anything in [] get executed?<br><br>surely all you need is if{$chan != $runchan} {}?<br><br>[edit] Doh ... just too late.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1824">Photon</a> — Thu Oct 17, 2002 12:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2002-10-17T12:17:10-04:00</updated>

		<published>2002-10-17T12:06:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12077#p12077</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12077#p12077"/>
		<title type="html"><![CDATA[DCC File Sends]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12077#p12077"><![CDATA[
<blockquote class="uncited"><div>Still does this with the modules turned on (they were off before)<br><br>[17:04:29] &lt;Minako&gt; [17:04] Tcl error [pub:infosend]: invalid command name "#weirdo"</div></blockquote>1. ==&gt; [$chan != $runchan]<br><br>putting a [ and a ] around it makes it a command.<br><br>2. ==&gt; [onchan $runchan $nick]<br><br>check out doc/tcl-commands.doc<br><br>3. ==&gt; $chan != $runchan || [onchan $nick $runchan] == 0<br><br>first you test that the channel the trigger came from is $runchan and then you test if the nick is on $runchan.<br>Suppose that $chan == $runchan, what does the [onchan] test then return? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Thu Oct 17, 2002 12:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Weirdo]]></name></author>
		<updated>2002-10-17T12:03:04-04:00</updated>

		<published>2002-10-17T12:03:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12076#p12076</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12076#p12076"/>
		<title type="html"><![CDATA[DCC File Sends]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12076#p12076"><![CDATA[
Still does this with the modules turned on (they were off before)<br><br>[17:04:29] &lt;Minako&gt; [17:04] Tcl error [pub:infosend]: invalid command name "#weirdo"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1195">Weirdo</a> — Thu Oct 17, 2002 12:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-10-17T07:57:38-04:00</updated>

		<published>2002-10-17T07:57:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12068#p12068</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12068#p12068"/>
		<title type="html"><![CDATA[DCC File Sends]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12068#p12068"><![CDATA[
You will need to load the transfer and filesys modules for this to work.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Oct 17, 2002 7:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Weirdo]]></name></author>
		<updated>2002-10-17T07:55:43-04:00</updated>

		<published>2002-10-17T07:55:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12066#p12066</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12066#p12066"/>
		<title type="html"><![CDATA[DCC File Sends]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12066#p12066"><![CDATA[
ok, 2nd post for today, hope i aint pushing my luck. I am trying to add more onto this rule script by giving an option which will send the FAQ, Rules and Op rules, in an info.txt file. When someoe does !rule_send it should send<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !rule_send pub:infosendproc pub:infosend { nick host hand chan text} {global runchan infofileif {[$chan != $runchan] || [onchan $runchan $nick] == 0 } {return 0}dccsend $infofile $nick}</code></pre></div>What it gives me is #weirdo - invalid command name. <br><br>$runchan = #weirdo<br><br>Any help?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1195">Weirdo</a> — Thu Oct 17, 2002 7:55 am</p><hr />
]]></content>
	</entry>
	</feed>
