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

	<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>2005-02-10T18:41:24-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Buffy_25]]></name></author>
		<updated>2005-02-10T18:41:24-04:00</updated>

		<published>2005-02-10T18:41:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46503#p46503</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46503#p46503"/>
		<title type="html"><![CDATA[Tcl error [joinproc]: invalid command name &quot;}&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46503#p46503"><![CDATA[
stdragon,<br>Thnx so much ! It's working great  (no fault anymore) <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br><br>Thnx for all the help guys!<br><br>Buffy<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4178">Buffy_25</a> — Thu Feb 10, 2005 6:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2005-02-09T11:55:07-04:00</updated>

		<published>2005-02-09T11:55:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46450#p46450</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46450#p46450"/>
		<title type="html"><![CDATA[Tcl error [joinproc]: invalid command name &quot;}&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46450#p46450"><![CDATA[
Hey your comments are messing things up... delete those lines instead of just adding a #. At least, that worked for me.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Wed Feb 09, 2005 11:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-02-07T13:36:15-04:00</updated>

		<published>2005-02-07T13:36:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46374#p46374</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46374#p46374"/>
		<title type="html"><![CDATA[Tcl error [joinproc]: invalid command name &quot;}&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46374#p46374"><![CDATA[
just as note, I don't have problems with {} within an [expr ] command. I use this line really fine:<div class="codebox"><p>Code: </p><pre><code>[expr {$kataschaden - pow(1.20, $i)}]</code></pre></div>in a for loop.<br><br>But triiing will make wise <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=2382">De Kus</a> — Mon Feb 07, 2005 1:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2005-02-07T09:11:33-04:00</updated>

		<published>2005-02-07T09:11:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46366#p46366</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46366#p46366"/>
		<title type="html"><![CDATA[Tcl error [joinproc]: invalid command name &quot;}&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46366#p46366"><![CDATA[
Try changing:<div class="codebox"><p>Code: </p><pre><code>set ::joined($nick) [getchanjoin $nick #channel]</code></pre></div>to<div class="codebox"><p>Code: </p><pre><code>set ::joined($nick) [getchanjoin $nick "#channel"]</code></pre></div>I just noticed it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Mon Feb 07, 2005 9:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-02-07T09:05:40-04:00</updated>

		<published>2005-02-07T09:05:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46365#p46365</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46365#p46365"/>
		<title type="html"><![CDATA[Tcl error [joinproc]: invalid command name &quot;}&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46365#p46365"><![CDATA[
You mean this one?<br><div class="codebox"><p>Code: </p><pre><code>   foreach nick [chanlist #channel] {      if {![info exists ::joined($nick)]} {       set ::joined($nick) [getchanjoin $nick #channel]      }</code></pre></div>This also looks fine.<br>Just dont use these curly braces for anything other than opening closing new statements and conditions in a procedure.<br><br>This should be:<div class="codebox"><p>Code: </p><pre><code>putbot Blacky "join $nick [expr {[clock seconds] - $::joined($nick)}]" </code></pre></div>Like this:<div class="codebox"><p>Code: </p><pre><code>putbot Blacky "join $nick [expr ([clock seconds] - $::joined($nick))]"</code></pre></div>You should remove all of these and fix them throughout your procedure.<br><br>As Alchera said maybe you had to put a "}" after this line<br><div class="codebox"><p>Code: </p><pre><code>putbot Blacky "join $nick [expr {[clock seconds] - $::joined($nick)}]"</code></pre></div>Because otherwise your foreach loop 2 in the end would be embedded in your foreach loop 1. Meaning a loop running within a loop and somewhere causing a problem.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Feb 07, 2005 9:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2005-02-07T09:01:23-04:00</updated>

		<published>2005-02-07T09:01:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46364#p46364</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46364#p46364"/>
		<title type="html"><![CDATA[Tcl error [joinproc]: invalid command name &quot;}&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46364#p46364"><![CDATA[
The first foreach loop looks to be the problem, not the second.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Mon Feb 07, 2005 9:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-02-07T08:58:49-04:00</updated>

		<published>2005-02-07T08:58:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46363#p46363</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46363#p46363"/>
		<title type="html"><![CDATA[Tcl error [joinproc]: invalid command name &quot;}&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46363#p46363"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>foreach {nick ago} $arg {  set ::joined($nick) [expr ([unixtime] - $ago)]  puthelp "PRIVMSG #controlchan :$nick has already joined as of [duration  $::joined($nick)] ago"}</code></pre></div>Hmmm... interesting... don't find any logical error in here whatsoever.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Feb 07, 2005 8:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2005-02-07T08:59:00-04:00</updated>

		<published>2005-02-07T08:58:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46362#p46362</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46362#p46362"/>
		<title type="html"><![CDATA[Tcl error [joinproc]: invalid command name &quot;}&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46362#p46362"><![CDATA[
<blockquote class="uncited"><div>When i typed in the partyline: '.set errorInfo' i got : What? You need '.help'</div></blockquote><blockquote class="uncited"><div>#unbind dcc n tcl *dcc:tcl<br>#unbind dcc n set *dcc:set</div></blockquote>.. then .rehash your bot.<br><br>As for your error, try reconstructing your first foreach loop; it appears that is where your error is.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Mon Feb 07, 2005 8:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-02-07T08:56:28-04:00</updated>

		<published>2005-02-07T08:56:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46361#p46361</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46361#p46361"/>
		<title type="html"><![CDATA[Tcl error [joinproc]: invalid command name &quot;}&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46361#p46361"><![CDATA[
For the .tcl set errorInfo you should read some posts in this thread.<br><br><a href="http://forum.egghelp.org/viewtopic.php?t=9096" class="postlink">http://forum.egghelp.org/viewtopic.php?t=9096</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Feb 07, 2005 8:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Buffy_25]]></name></author>
		<updated>2005-02-07T08:31:44-04:00</updated>

		<published>2005-02-07T08:31:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46358#p46358</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46358#p46358"/>
		<title type="html"><![CDATA[Tcl error [joinproc]: invalid command name &quot;}&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46358#p46358"><![CDATA[
awyeah,<br><br>I counted those brackets several times, and always i got the same openings as same closings.<br>I even tried to remove some parts of the script to be sure, but even with that i'm still getting this error  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> <br><br>I don't understand and kind of lost.<br><br>Buffy<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4178">Buffy_25</a> — Mon Feb 07, 2005 8:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Buffy_25]]></name></author>
		<updated>2005-02-07T08:27:58-04:00</updated>

		<published>2005-02-07T08:27:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46357#p46357</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46357#p46357"/>
		<title type="html"><![CDATA[Tcl error [joinproc]: invalid command name &quot;}&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46357#p46357"><![CDATA[
Hi,<br><br>I tried to check with '.set errorInfo' in partyline but without luck. When i typed in the partyline: '.set errorInfo' i got : What?  You need '.help'<br>After this i tried to put in my bot1 script after 'global joined' : <blockquote class="uncited"><div>set errorInfo</div></blockquote>and made my bot Blacky rejoin and then typed in partyline .set errorInfo but still same : What?  You need '.help'<br><br>Am i doing something wrong to be able to check the error? (to get more structured details about this error)<br><br>Additionally,<br>I tried with the new "foreach" part in Blacky's script, but couldn't see the msg's in #controlchan.<br>I suppose that when bot1 sends with 'putbot Blacky "join $nick [expr {[clock seconds] - $::joined($nick)}]" i should engage a trigger at Blacky and so he can confirm his info in #controlchan, right?<br>Is there a way to see if this trigger "join" is good reciept by Blacky? Maybe there is already an error?<br><br>Thanks.<br><br>Buffy<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4178">Buffy_25</a> — Mon Feb 07, 2005 8:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-02-07T08:08:31-04:00</updated>

		<published>2005-02-07T08:08:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46355#p46355</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46355#p46355"/>
		<title type="html"><![CDATA[Tcl error [joinproc]: invalid command name &quot;}&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46355#p46355"><![CDATA[
Most of the time what this basically means is:<br><div class="codebox"><p>Code: </p><pre><code>Tcl error [joinproc]: invalid command name "}"</code></pre></div>You have an extra closing curly bracket "}" some where in your procedure. Count the total number of opening and closing braces make sure they are equal.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Feb 07, 2005 8:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-02-06T23:55:41-04:00</updated>

		<published>2005-02-06T23:55:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46349#p46349</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46349#p46349"/>
		<title type="html"><![CDATA[Tcl error [joinproc]: invalid command name &quot;}&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46349#p46349"><![CDATA[
have you tried using ".set errorInfo" on partyline to get a more detailed error? it should tell you the construct within the error occured. The message sounds like a bracet error, but script highlighting doesnt find any open or to many closed, either.<br>really strange. You dont need to use :: when the variable is already "global ..." and you can use [unixtime] instead of [clock seconds], but I cannot imaging one of these would cause such an error <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">.<br><br>On the other bot you have used foreach a bit strange, id rather use something like this:<div class="codebox"><p>Code: </p><pre><code>foreach "nick ago" $arg {  set ::joined($nick) [expr { [unixtime] - $ago } ]  puthelp "PRIVMSG #controlchan :$nick has already joined as of [duration  $::joined($nick)] ago"}</code></pre></div>this might at least fix your problem regarding the control channel.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun Feb 06, 2005 11:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Buffy_25]]></name></author>
		<updated>2005-02-06T18:07:20-04:00</updated>

		<published>2005-02-06T18:07:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46347#p46347</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46347#p46347"/>
		<title type="html"><![CDATA[Tcl error [joinproc]: invalid command name &quot;}&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46347#p46347"><![CDATA[
Hi,<br>I have a problem with my code below. I have two bots in my channel. When Blacky joins, this bot1 sends the current uptime of the online users in #channel to Blacky. But before that those times are being sent to Blacky, Blacky needs to reset it's times. So this bot1 sends (putbot) "clear" to Blacky so that Blacky unset his parameters. After this the uptimes are being sent from bot1 to Blacky and Blacky confirms this by putting a copy of this into #controlchan.<br><br>Find below the code for this bot1:<br><div class="codebox"><p>Code: </p><pre><code>bind join - * joinprocproc joinproc {nick uhost hand chan} {   if {![string match -nocase "$chan" "#channel"]} { return 0 }  global joined#if {[isbotnick $nick]} {return} i removed this temporary  set ::joined($nick) [clock seconds]#if {[string equal -nocase [nick2hand $nick] "Blacky"]} { i removed this temporary  if {[string equal -nocase $nick "Blacky"] || [string match -nocase "*@testing.com" $uhost]} {puthelp "PRIVMSG #controlchan :Blacky, i'm clearing your uptime-database so you can update your uptimes with mine" putbot Blacky "clear"puthelp "PRIVMSG #controlchan :Blacky, I'm sending the info..." foreach nick [chanlist "#channel"] { if {![info exists ::joined($nick)]} {  set ::joined($nick) [getchanjoin $nick #channel]}  putbot Blacky "join $nick [expr {[clock seconds] - $::joined($nick)}]"  puthelp "PRIVMSG #controlchan :$nick has already joined as of [duration [expr {[clock seconds] - $::joined($nick)}]] ago"     }  } else {      putbot Blacky "join $nick 0"  }}</code></pre></div>Find below the code for Blacky (with this info he clears first his times and then adds in his parameters the uptimes of the users (info passed from bot1):<div class="codebox"><p>Code: </p><pre><code>bind bot - "clear" procbot_clearproc procbot_clear {from-bot command arg} {catch {unset ::joined}}bind bot - "join" procbot_joinproc procbot_join {from-bot command arg} {puthelp "PRIVMSG #controlchan :Bot1 has sent me the following information:" foreach {nick ago} $arg breakset ::joined($nick) [expr { [clock seconds] - $ago } ]puthelp "PRIVMSG #controlchan :$nick has already joined as of [duration { $::joined($nick) } ] ago" }</code></pre></div>But i'm having the following problems:<br>1/ When Blacky joins #channel, i get the following error in telnet:<blockquote class="uncited"><div>Tcl error [joinproc]: invalid command name "}"</div></blockquote>What could be the problem? i checked all the }, but didn't find any too much.<br>2/ Additionally, once all the times are sent from bot1 to Blacky, i don't see the msg in #controlchan sent by Blacky:<br>$nick has already joined as of [duration { $::joined($nick) } ] ago<br>Does this mean that it's not triggered with the word "join" coming from bot1 ? Is the structure for putbot not correct? Or is the trigger script from Blacky not correct?<br><br>Thanks in advance.<br><br>Buffy<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4178">Buffy_25</a> — Sun Feb 06, 2005 6:07 pm</p><hr />
]]></content>
	</entry>
	</feed>
