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

	<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>2006-01-08T21:12:23-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-01-08T21:12:23-04:00</updated>

		<published>2006-01-08T21:12:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59275#p59275</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59275#p59275"/>
		<title type="html"><![CDATA[user count in channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59275#p59275"><![CDATA[
I thought about that issue and wanted to test it but didn't have time ([chanlist #chan] might be returning the nicks <strong class="text-strong">including</strong> the parted nick). Good thing you found out <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=3085">Sir_Fz</a> — Sun Jan 08, 2006 9:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[T-Xorcist]]></name></author>
		<updated>2006-01-08T17:31:03-04:00</updated>

		<published>2006-01-08T17:31:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59268#p59268</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59268#p59268"/>
		<title type="html"><![CDATA[user count in channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59268#p59268"><![CDATA[
This is what I tried so far.<br><div class="codebox"><p>Code: </p><pre><code>proc proc:part {nick uhost hand chan rsn} {  putquick "PRIVMSG $nick :You just parted \002$chan\002"}</code></pre></div>The code above <strong class="text-strong">works</strong>!<br><div class="codebox"><p>Code: </p><pre><code>proc proc:part {nick uhost hand chan rsn} {  channel remove $chan}</code></pre></div>The code above <strong class="text-strong">works</strong>!<br><div class="codebox"><p>Code: </p><pre><code>proc proc:part {nick uhost hand chan rsn} {  putquick "PRIVMSG $nick :[llength [chanlist $chan]]"}</code></pre></div>With the code above, I located the problem!<br>When I parted, and the bot was alone, I got the number <strong class="text-strong">2</strong><br>So if the last man parted, it is 2, not 1!<br><br>Now it works perfect and he displays it in #bots!<br><br>Thanks for all your effort to help me out because it sure helped me!!<br><br>Respect, T-Xorcist<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6980">T-Xorcist</a> — Sun Jan 08, 2006 5:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-01-08T10:42:14-04:00</updated>

		<published>2006-01-08T10:42:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59255#p59255</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59255#p59255"/>
		<title type="html"><![CDATA[user count in channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59255#p59255"><![CDATA[
The part proc also gets called when your bot parts. Try<div class="codebox"><p>Code: </p><pre><code>bind part - * proc:partproc proc:part {nick uhost hand chan rsn} {  if {[isbotnick $nick]} {return 0}  if {[llength [chanlist $chan]] == 1} {    if {[validchan #bots]} {      putquick "PRIVMSG #bots :\002$chan\002 is empty, parting it now!"    }    channel remove $chan  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Jan 08, 2006 10:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[T-Xorcist]]></name></author>
		<updated>2006-01-08T10:14:03-04:00</updated>

		<published>2006-01-08T10:14:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59251#p59251</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59251#p59251"/>
		<title type="html"><![CDATA[user count in channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59251#p59251"><![CDATA[
Yes, here it comes again. This is what I have right now.<br><div class="codebox"><p>Code: </p><pre><code>bind part - * proc:partproc proc:part {nick uhost hand chan rsn} {  if {[validchan $chan]} {    if {[llength [chanlist $chan]] == 1} {      putquick "PRIVMSG #bots :\002$chan\002 is empty, parting it now!"      channel remove $chan    }  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6980">T-Xorcist</a> — Sun Jan 08, 2006 10:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2006-01-08T10:10:35-04:00</updated>

		<published>2006-01-08T10:10:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59249#p59249</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59249#p59249"/>
		<title type="html"><![CDATA[user count in channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59249#p59249"><![CDATA[
Post your script T-Xorcist so that we can see where the problem is.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Sun Jan 08, 2006 10:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-01-08T09:23:54-04:00</updated>

		<published>2006-01-08T09:23:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59241#p59241</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59241#p59241"/>
		<title type="html"><![CDATA[user count in channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59241#p59241"><![CDATA[
it sounds like you have 2 binds to the chan, one that messages and the other removes the channel before the is called, that would be one of the possible reasons I can think of for that error.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun Jan 08, 2006 9:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-01-07T23:45:04-04:00</updated>

		<published>2006-01-07T23:45:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59224#p59224</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59224#p59224"/>
		<title type="html"><![CDATA[user count in channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59224#p59224"><![CDATA[
Try removing the channel and adding it again.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Jan 07, 2006 11:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[T-Xorcist]]></name></author>
		<updated>2006-01-07T21:45:35-04:00</updated>

		<published>2006-01-07T21:45:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59220#p59220</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59220#p59220"/>
		<title type="html"><![CDATA[user count in channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59220#p59220"><![CDATA[
<blockquote class="uncited"><div>Is #bots the channel the bot is parting? If so, once the bot removes it, it becomes invalid.</div></blockquote>No, the bot is allways in #bots. He must say that he is leaving a channel in #bots.<br>But it still doesn't work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>And your solution doesn't work either ceasar <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6980">T-Xorcist</a> — Sat Jan 07, 2006 9:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2006-01-07T16:17:08-04:00</updated>

		<published>2006-01-07T16:17:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59212#p59212</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59212#p59212"/>
		<title type="html"><![CDATA[user count in channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59212#p59212"><![CDATA[
A 'if {![validchan $chan]} return' should fix this.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Jan 07, 2006 4:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-01-07T10:52:54-04:00</updated>

		<published>2006-01-07T10:52:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59203#p59203</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59203#p59203"/>
		<title type="html"><![CDATA[user count in channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59203#p59203"><![CDATA[
Is #bots the channel the bot is parting? If so, once the bot removes it, it becomes invalid.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Jan 07, 2006 10:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[T-Xorcist]]></name></author>
		<updated>2006-01-06T20:49:12-04:00</updated>

		<published>2006-01-06T20:49:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59173#p59173</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59173#p59173"/>
		<title type="html"><![CDATA[user count in channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59173#p59173"><![CDATA[
I get the following error in the logfile:<br><br>Tcl error [proc:part]: invalid channel: #bots<br><br>Why? the channel excists <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=6980">T-Xorcist</a> — Fri Jan 06, 2006 8:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-01-06T20:39:27-04:00</updated>

		<published>2006-01-06T20:39:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59172#p59172</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59172#p59172"/>
		<title type="html"><![CDATA[user count in channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59172#p59172"><![CDATA[
bind part takes 5 arguments not 4 (reason included)<div class="codebox"><p>Code: </p><pre><code>bind part - * proc:partproc proc:part {nick uhost hand chan rsn} { if {[llength [chanlist $chan]] == 1} {  putquick "privmsg #bots :$chan is empty, parting it now!" }}</code></pre></div>PS: raw takes 3 arguments.<blockquote class="uncited"><div>RAW (stackable)<br>         bind raw &lt;flags&gt; &lt;keyword&gt; &lt;proc&gt;<br>         procname &lt;from&gt; &lt;keyword&gt; &lt;text&gt;<br><br>         Description: previous versions of Eggdrop required a special compile<br>           option to enable this binding, but it's now standard. The keyword<br>           is either a numeric, like "368", or a keyword, such as "PRIVMSG".<br>           from will be the server name or the source user (depending on<br>           the keyword); flags are ignored. The order of the arguments is<br>           identical to the order that the IRC server sends to the bot. The<br>           pre-processing  only splits it apart enough to determine the<br>           keyword. If the proc returns 1, Eggdrop will not process the line<br>           any further (this could cause unexpected behavior in some cases).<br>         Module: server</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Jan 06, 2006 8:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[T-Xorcist]]></name></author>
		<updated>2006-01-06T20:31:39-04:00</updated>

		<published>2006-01-06T20:31:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59171#p59171</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59171#p59171"/>
		<title type="html"><![CDATA[user count in channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59171#p59171"><![CDATA[
Well, I was thing more like this:<br><div class="codebox"><p>Code: </p><pre><code>bind raw - PART proc:partproc proc:part {nick uhost hand chan} { if {[llength [chanlist $chan]] == 1} {    putquick "PRIVMSG #Bots :Leaving \002$chan\002 - Reason: \002Empty channel!\002"  }}</code></pre></div>But this doesn't work.<br><em class="text-italics">bind raw - PART proc:part</em> doesn't seem to work.<br><em class="text-italics">bind part - * proc:part</em> doesn't seem to work either.<br><br>How do I trigger something when someone parts the channel?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6980">T-Xorcist</a> — Fri Jan 06, 2006 8:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2006-01-06T19:42:53-04:00</updated>

		<published>2006-01-06T19:42:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59163#p59163</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59163#p59163"/>
		<title type="html"><![CDATA[user count in channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59163#p59163"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind time  - ?0* checkcproc checkc args { if {[llength [chanlist #yourchannel]] == 1} {  channel remove #yourchannel }}</code></pre></div>this checks every 10 minutes, if #yourchannel is empty the bot parts it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Jan 06, 2006 7:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2006-01-06T17:02:24-04:00</updated>

		<published>2006-01-06T17:02:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=59155#p59155</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=59155#p59155"/>
		<title type="html"><![CDATA[user count in channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=59155#p59155"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>[llength [chanlist &lt;channel&gt;]]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Fri Jan 06, 2006 5:02 pm</p><hr />
]]></content>
	</entry>
	</feed>
