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

	<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>2003-07-28T12:06:01-04:00</updated>

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

		<entry>
		<author><name><![CDATA[LtPhil]]></name></author>
		<updated>2003-07-28T12:06:01-04:00</updated>

		<published>2003-07-28T12:06:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24103#p24103</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24103#p24103"/>
		<title type="html"><![CDATA[n00b to DCC bindings :x]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24103#p24103"><![CDATA[
oof.  i see it now.  i had to delete and re-write the IF block from scratch... when i did, it worked... then i copied and pasted it into notepad, and copied the original IF statement from my first post, and saw.<br><br>/me is enlightened<br><br>thank you <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=3577">LtPhil</a> — Mon Jul 28, 2003 12:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-07-28T12:00:11-04:00</updated>

		<published>2003-07-28T12:00:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24101#p24101</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24101#p24101"/>
		<title type="html"><![CDATA[n00b to DCC bindings :x]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24101#p24101"><![CDATA[
<blockquote class="uncited"><div>user: i don't see a problem with the if statement...</div></blockquote>Take another look. The code you pasted with the entire if stucture commented out was valid.<br><br>Because newlines don't have the same effect between braces this is basically what your code looks like to the parser (count the arguments):<div class="codebox"><p>Code: </p><pre><code>proc bla {} {if {}} {}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Jul 28, 2003 12:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[LtPhil]]></name></author>
		<updated>2003-07-28T10:55:05-04:00</updated>

		<published>2003-07-28T10:55:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24096#p24096</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24096#p24096"/>
		<title type="html"><![CDATA[n00b to DCC bindings :x]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24096#p24096"><![CDATA[
looking at the error more in-depth, it's acting like it's having a problem with the actual call to <strong class="text-strong">proc</strong>... but i'm doing<br><br><strong class="text-strong">proc <em class="text-italics">name</em> {<em class="text-italics">args</em>} {<br>  <em class="text-italics">body</em><br>}</strong><br><br>... so i don't get it  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3577">LtPhil</a> — Mon Jul 28, 2003 10:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[LtPhil]]></name></author>
		<updated>2003-07-28T10:47:53-04:00</updated>

		<published>2003-07-28T10:47:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24095#p24095</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24095#p24095"/>
		<title type="html"><![CDATA[n00b to DCC bindings :x]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24095#p24095"><![CDATA[
<blockquote class="uncited"><div>wrong # args: should be "proc name args body"<br>    while executing<br>"proc xs_mailnote {hand idx text body} {<br>  global botnet-nick<br>  set toaddr [string range $text 0 [expr ([tcl_wordBreakAfter $text 0] - 1)]]<br>  set subje..."</div></blockquote>-- same error, sir_fz<br><br>user: i don't see a problem with the if statement...<br><div class="codebox"><p>Code: </p><pre><code>proc xs_mailnote {hand idx text body} {  global botnet-nick  set toaddr [string range $text 0 [expr ([tcl_wordBreakAfter $text 0] - 1)]]  set subject "${botnet-nick} partyline note from ${hand}"  set msgbody [string range $text [expr ([tcl_wordBreakAfter $text 0] + 1)] end]#  if {[catch {exec mail -s "${subject}" $toaddr $msgbody}]}#    putlog "Error sending note to $toaddr"#  } else {#    putlog "Sent note to $toaddr"#  }  putdcc $idx "${botnet-nick} :: $text :: $body"}</code></pre></div>still produces the error shown above (with or without "body" in the args)<br><br>(edit: btw, i put the "else" in there explicitly just to see if it was fussing about that -- no go)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3577">LtPhil</a> — Mon Jul 28, 2003 10:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-07-28T10:41:40-04:00</updated>

		<published>2003-07-28T10:41:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24094#p24094</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24094#p24094"/>
		<title type="html"><![CDATA[n00b to DCC bindings :x]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24094#p24094"><![CDATA[
The "if" is missing a "{", and because of that the rest of your code gets out of sync (in lack of a better word) and the "else" part of the if becomes the 4th argument to "proc"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Mon Jul 28, 2003 10:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[LtPhil]]></name></author>
		<updated>2003-07-28T10:39:12-04:00</updated>

		<published>2003-07-28T10:39:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24093#p24093</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24093#p24093"/>
		<title type="html"><![CDATA[n00b to DCC bindings :x]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24093#p24093"><![CDATA[
err okay, that makes sense... but looking at various docs on the web, they kept specifying only three arguments for the proc... so what's the difference between $text and $bod?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3577">LtPhil</a> — Mon Jul 28, 2003 10:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2003-07-28T10:36:55-04:00</updated>

		<published>2003-07-28T10:36:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24092#p24092</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24092#p24092"/>
		<title type="html"><![CDATA[n00b to DCC bindings :x]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24092#p24092"><![CDATA[
the error explains what's the mistake:<blockquote class="uncited"><div>wrong # args: should be "proc name args body"</div></blockquote>and your proc is :<div class="codebox"><p>Code: </p><pre><code>proc xs_mailnote {hand idx text} {</code></pre></div>so try to make it <strong class="text-strong">proc xs_mailnote {hand idx text bod} {</strong> <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=3085">Sir_Fz</a> — Mon Jul 28, 2003 10:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[LtPhil]]></name></author>
		<updated>2003-07-28T10:30:54-04:00</updated>

		<published>2003-07-28T10:30:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=24091#p24091</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=24091#p24091"/>
		<title type="html"><![CDATA[n00b to DCC bindings :x]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=24091#p24091"><![CDATA[
i'm using the following code to try and make it so i can send quick e-mail notes while DCC'ed to my bot, but it dies with the error<br><blockquote class="uncited"><div>wrong # args: should be "proc name args body"<br>    while executing<br>"proc xs_mailnote {hand idx text} {<br>  global botnet-nick<br>  set toaddr [string range $text 0 [expr ([tcl_wordBreakAfter $text 0] - 1)]]<br>  set subject "$..."</div></blockquote>this is the code i am (trying to) use:<br><div class="codebox"><p>Code: </p><pre><code>bind dcc n mailnote xs_mailnoteproc xs_mailnote {hand idx text} {  global botnet-nick  set toaddr [string range $text 0 [expr ([tcl_wordBreakAfter $text 0] - 1)]]  set subject "${botnet-nick} partyline note from ${hand}"  set msgbody [string range $text [expr ([tcl_wordBreakAfter $text 0] + 1)] end]  if {[catch {exec mail -s "${subject}" $toaddr $msgbody}]}    putlog "Error sending note to $toaddr"  } {    putlog "Sent note to $toaddr"  }}</code></pre></div> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"> [/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3577">LtPhil</a> — Mon Jul 28, 2003 10:30 am</p><hr />
]]></content>
	</entry>
	</feed>
