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

	<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>2019-10-06T05:37:30-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2019-10-06T05:37:30-04:00</updated>

		<published>2019-10-06T05:37:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107858#p107858</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107858#p107858"/>
		<title type="html"><![CDATA[help join/part script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107858#p107858"><![CDATA[
The only obvious error I can see in this code, is that you've placed "else {" on a separate line.<br>Unlike languages like C, Java, etc; tcl is strictly newline-terminated outside blocks. As your code stands now, tcl tries to interpret "else" as a new command, as opposed to an argument to "if":<div class="codebox"><p>Code: </p><pre><code>// this is okif {some expression} then {  code here} else {  other code here}//or simplifiedif {some expression} {  code here} {  other code here}//or condensedif {some expression} {code here} {other code here}// these however will not workif {some expression}{  code here}...// then-body is not part of the if-command due to the newline _before_ {if {some expression} {  code here} else{  code here}// else-body is not part of the if-command due to the newline _before_ {if {some expression} {  code here}else {  code here}// else-keyword and -body is not part of the if-command due to the newline _before_ else</code></pre></div>Hope these examples illustrate the issue<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Oct 06, 2019 5:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Repdientu]]></name></author>
		<updated>2019-10-05T23:56:49-04:00</updated>

		<published>2019-10-05T23:56:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107857#p107857</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107857#p107857"/>
		<title type="html"><![CDATA[help join/part script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107857#p107857"><![CDATA[
i change script to:<div class="codebox"><p>Code: </p><pre><code>set p_chan "#Lobby"set p_time 5proc joinpart_start {} {  global p_time  if {[string match *p_joinpart* [timers]]} {return 0}  timer [expr [rand $p_time] + 1] p_joinpart}proc p_joinpart {} {  global botnick p_chan p_time  if {![validchan $p_chan]} {    channel add $p_chan  }  else  {    channel remove $p_chan  }  timer [expr [rand $p_time] + 1] p_joinpart}set p_chan [string tolower $p_chan]joinpart_start</code></pre></div>but it not work. can you help me ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10625">Repdientu</a> — Sat Oct 05, 2019 11:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2019-10-05T12:57:43-04:00</updated>

		<published>2019-10-05T12:57:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107856#p107856</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107856#p107856"/>
		<title type="html"><![CDATA[help join/part script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107856#p107856"><![CDATA[
Hello,<br>The first thing that comes to mind, is that "onchan" only works for channels added to your eggdrop's channel-list. As such, your script would then crash once your eggdrop has left the channel.<br><br>The options I see, is either to use the "inactive" channel modifier to temporarily disable the channel (rather than delete it); or if you still prefer to delete it, you'd have to use "validchan" to check whether the channel is valid, rather than using "onchan" (or "botonchan" for that matter).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Oct 05, 2019 12:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Repdientu]]></name></author>
		<updated>2019-10-05T02:11:31-04:00</updated>

		<published>2019-10-05T02:11:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107855#p107855</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107855#p107855"/>
		<title type="html"><![CDATA[help join/part script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107855#p107855"><![CDATA[
Hello<br>i write script to join(part) script but it not work (bot part but not join #)<br><br>here is my script<div class="codebox"><p>Code: </p><pre><code>set p_chan "#Lobby"set p_time 5proc joinpart_start {} {  global p_time  if {[string match *p_joinpart* [timers]]} {return 0}  timer [expr [rand $p_time] + 1] p_joinpart}proc p_joinpart {} {  global botnick p_chan p_time  if {[onchan $botnick $p_chan]} {    channel remove $p_chan  }  if {![onchan $botnick $p_chan]} {    channel add $p_chan  }  timer [expr [rand $p_time] + 1] p_joinpart}set p_chan [string tolower $p_chan]joinpart_start</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10625">Repdientu</a> — Sat Oct 05, 2019 2:11 am</p><hr />
]]></content>
	</entry>
	</feed>
