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

	<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>2007-07-16T06:37:06-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-07-16T06:37:06-04:00</updated>

		<published>2007-07-16T06:37:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74468#p74468</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74468#p74468"/>
		<title type="html"><![CDATA[REALLY SIMPLE - I'm having a block and am tired.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74468#p74468"><![CDATA[
Basically, [join] converts lists into strings. Check the <a href="http://www.tcl.tk/man/tcl8.4/TclCmd/join.htm" class="postlink">join</a> manual page.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon Jul 16, 2007 6:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2007-07-16T04:43:16-04:00</updated>

		<published>2007-07-16T04:43:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74467#p74467</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74467#p74467"/>
		<title type="html"><![CDATA[REALLY SIMPLE - I'm having a block and am tired.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74467#p74467"><![CDATA[
<blockquote class="uncited"><div>bind part &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>procname &lt;nick&gt; &lt;user@host&gt; &lt;handle&gt; &lt;channel&gt; &lt;msg&gt;<br><br>Description: triggered by someone leaving the channel. The mask is matched against "#channel nick!user@host" and can contain wildcards. If no part message is specified, msg will be set to "".<br><br>New Tcl procs should be declared as<br><br>  proc partproc {nick uhost hand chan {msg ""}} { ... }<br><br>for compatibility.<br><br>Module: irc</div></blockquote>Something like this:<br><div class="codebox"><p>Code: </p><pre><code>bind part - "*" check:users:on:partproc check:users:on:part {nick uhost hand chan {text ""}} { if {![isbotnick $nick]} {  #whatever you want to do here  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Jul 16, 2007 4:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Zorb]]></name></author>
		<updated>2007-07-16T04:40:07-04:00</updated>

		<published>2007-07-16T04:40:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74466#p74466</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74466#p74466"/>
		<title type="html"><![CDATA[REALLY SIMPLE - I'm having a block and am tired.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74466#p74466"><![CDATA[
Okay well, everything works well but when someone parts the channel I need it to check the users again. <br><br>So what's the bind for when someone parts the channel?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8299">Zorb</a> — Mon Jul 16, 2007 4:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2007-07-16T03:41:45-04:00</updated>

		<published>2007-07-16T03:41:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74460#p74460</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74460#p74460"/>
		<title type="html"><![CDATA[REALLY SIMPLE - I'm having a block and am tired.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74460#p74460"><![CDATA[
Why shouldn't we apply join over a string? join is used in relation with strings. I don't understand this, please elaborate Sir_Fz.<br><br>Anyway Tossers, could would work, but as caesar mentioned to make it more understandable and readable easier to the eye, you can use this:<br><div class="codebox"><p>Code: </p><pre><code>bind raw - INVITE invite:detectorbind raw - 315 check:chan:countproc invite:detector {from keyword arg} { global invite set chan [lindex [split [join [string tolower $arg] ""] :] 1] if {[validchan $chan]} { return 0 } set invite($chan) 1 channel add $chan}proc check:chan:count {from keyword arg} { global invite set chan [string tolower [lindex [split $arg] 1]] if {[info exists invite($chan)]} {  if {[llength [chanlist $chan]] &lt; 3} {   channel remove $chan   unset invite($chan)  } else {   unset invite($chan)  } }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Jul 16, 2007 3:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-07-15T09:40:21-04:00</updated>

		<published>2007-07-15T09:40:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74444#p74444</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74444#p74444"/>
		<title type="html"><![CDATA[REALLY SIMPLE - I'm having a block and am tired.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74444#p74444"><![CDATA[
Do not apply join over a string.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sun Jul 15, 2007 9:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2007-07-14T17:19:57-04:00</updated>

		<published>2007-07-14T17:19:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74438#p74438</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74438#p74438"/>
		<title type="html"><![CDATA[REALLY SIMPLE - I'm having a block and am tired.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74438#p74438"><![CDATA[
I see that you are using '[string tolower [lindex [split [join $arg ""] :] 1]]' 3 times. Why haven't you done the same thing like in 'if {![info exists invite([set chan [string tolower [lindex [split $arg] 1]]])]} {' ? <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=187">caesar</a> — Sat Jul 14, 2007 5:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2007-07-14T15:18:45-04:00</updated>

		<published>2007-07-14T15:18:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74434#p74434</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74434#p74434"/>
		<title type="html"><![CDATA[REALLY SIMPLE - I'm having a block and am tired.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74434#p74434"><![CDATA[
awyeah its best to bind on raw 315 (end of who) so then the bot would of got the list.<br><div class="codebox"><p>Code: </p><pre><code>bind raw - INVITE invite:detectorbind raw - 315 check:chan:countproc invite:detector {from keyword arg} { global invite if {[validchan [string tolower [lindex [split [join $arg ""] :] 1]]]} { return } set invite([string tolower [lindex [split [join $arg ""] :] 1]]) channel add [string tolower [lindex [split [join $arg ""] :] 1]]}proc check:chan:count {from keyword arg} { global invite if {![info exists invite([set chan [string tolower [lindex [split $arg] 1]]])]} {  unset $invite($chan)  if {[llength [chanlist $chan]] &lt; 3} {   channel remove $chan  } }}</code></pre></div>Just a few tweaks to awyeah's code.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Sat Jul 14, 2007 3:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2007-07-14T14:52:24-04:00</updated>

		<published>2007-07-14T14:52:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74430#p74430</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74430#p74430"/>
		<title type="html"><![CDATA[REALLY SIMPLE - I'm having a block and am tired.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74430#p74430"><![CDATA[
Well you will need to use bind raw with the keyword "INVITE". You will also need an additional bind join, for the bot to check on join the channel user count and then based on that either part or stay in the channel.<br><br>Here is a basic script which can do the work for you, make changes and edit it yourself the way you would want it to work accordingly.<br><div class="codebox"><p>Code: </p><pre><code>bind raw - INVITE invite:detectorbind join - "*" check:chan:countproc invite:detector {from keyword arg} { channel add [string tolower [lindex [split [join $arg ""] :] 1]]}proc check:chan:count {nick uhost hand chan} { if {[isbotnick $nick]} {  if {[llength [chanlist $chan]] &lt; 3} {    channel remove $chan    }  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Sat Jul 14, 2007 2:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2007-07-14T12:46:44-04:00</updated>

		<published>2007-07-14T12:46:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74426#p74426</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74426#p74426"/>
		<title type="html"><![CDATA[REALLY SIMPLE - I'm having a block and am tired.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74426#p74426"><![CDATA[
you want the end-of-who raw, which is raw 315.<br><br><a href="http://www.xs4all.nl/~wiebeson/rawlist.txt" class="postlink">http://www.xs4all.nl/~wiebeson/rawlist.txt</a> is a list of raws.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6300">r0t3n</a> — Sat Jul 14, 2007 12:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[scarface]]></name></author>
		<updated>2007-07-14T09:13:56-04:00</updated>

		<published>2007-07-14T09:13:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74423#p74423</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74423#p74423"/>
		<title type="html"><![CDATA[REALLY SIMPLE - I'm having a block and am tired.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74423#p74423"><![CDATA[
well, its [llength [chanlist #channel]]<br>but since the bot joins u should do this check after recieving the nicklist on the channel (bind raw) dont remember the raw atm. if you just use a bind join proc for it, the bot havent recieved the chanlist, and it will return 1.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6466">scarface</a> — Sat Jul 14, 2007 9:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Zorb]]></name></author>
		<updated>2007-07-14T08:51:05-04:00</updated>

		<published>2007-07-14T08:51:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=74422#p74422</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=74422#p74422"/>
		<title type="html"><![CDATA[REALLY SIMPLE - I'm having a block and am tired.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=74422#p74422"><![CDATA[
Well, the idea is when the bot is invited to a channel it joins but if the user amount in the channel is lower than 3 it will part.<br><br>I just can't think of how to get the number of people in the channel.<br><br>Thank you in advance.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8299">Zorb</a> — Sat Jul 14, 2007 8:51 am</p><hr />
]]></content>
	</entry>
	</feed>
