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

	<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-23T19:35:28-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Longbow]]></name></author>
		<updated>2005-02-23T19:35:28-04:00</updated>

		<published>2005-02-23T19:35:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46881#p46881</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46881#p46881"/>
		<title type="html"><![CDATA[Listing All Users &amp; Counting Ops]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46881#p46881"><![CDATA[
Ah, I got it all sorted, thanks. <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=5887">Longbow</a> — Wed Feb 23, 2005 7:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-02-22T20:49:00-04:00</updated>

		<published>2005-02-22T20:49:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46861#p46861</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46861#p46861"/>
		<title type="html"><![CDATA[Listing All Users &amp; Counting Ops]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46861#p46861"><![CDATA[
Try opening one file at a time, save your value in it, close it and then go for the next one.<br><br>Plus I don't understand why don't you save them in an array rather than writing all different files? Or just write all vaues into one file. Surely it will cut down your long code and will make the bot more efficient and probobaly more faster in replying.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Tue Feb 22, 2005 8:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Longbow]]></name></author>
		<updated>2005-02-22T12:15:22-04:00</updated>

		<published>2005-02-22T12:15:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46855#p46855</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46855#p46855"/>
		<title type="html"><![CDATA[Listing All Users &amp; Counting Ops]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46855#p46855"><![CDATA[
Ah woops, I found what was wrong.<br><br>Still getting loads of problems though...<br><div class="codebox"><p>Code: </p><pre><code>########## Join - Total/Op/Voice/Users ##########bind join - * join:allproc join:all {nick uhost hand chan} {set mychan #longbowset wtotal [open total.php w]set wop [open op.php w]set wvoice [open voice.php w]set wusers [open users.php w]puts $wtotal "[llength [chanlist $mychan]]"set opcount 0foreach user [chanlist $mychan] { if {[isop $user $mychan]} {  incr opcount  }}puts $wop "$opcount"set voicecount 0foreach user [chanlist $mychan] { if {[isvoice $user $mychan]} {  incr voicecount  }}puts $wvoice "$voicecount"puts $wusers "[join [chanlist $mychan] {, }]"close $wtotalclose $wopclose $wvoiceclose $wusers}########## Part - Total/Op/Voice/Users ##########bind sign - * part:allproc part:all {nick uhost hand chan msg} {set mychan #longbowset wtotal [open total.php w]set wop [open op.php w]set wvoice [open voice.php w]set wusers [open users.php w]puts $wtotal "[llength [chanlist $mychan]]"set opcount 0foreach user [chanlist $mychan] { if {[isop $user $mychan]} {  incr opcount  }}puts $wop "$opcount"set voicecount 0foreach user [chanlist $mychan] { if {[isvoice $user $mychan]} {  incr voicecount  }}puts $wvoice "$voicecount"puts $wusers "[join [chanlist $mychan] {, }]"close $wtotalclose $wopclose $wvoiceclose $wusers}########## Sign - Total/Op/Voice/Users ##########bind sign - * sign:allproc sign:all {nick uhost hand chan reason} {set mychan #longbowset wtotal [open total.php w]set wop [open op.php w]set wvoice [open voice.php w]set wusers [open users.php w]puts $wtotal "[llength [chanlist $mychan]]"set opcount 0foreach user [chanlist $mychan] { if {[isop $user $mychan]} {  incr opcount  }}puts $wop "$opcount"set voicecount 0foreach user [chanlist $mychan] { if {[isvoice $user $mychan]} {  incr voicecount  }}puts $wvoice "$voicecount"puts $wusers "[join [chanlist $mychan] {, }]"close $wtotalclose $wopclose $wvoiceclose $wusers}########## Most Users ##########bind join - * join:mostproc join:most {nick uhost hand chan} {set mychan #longbowset rmost [open most.php r]set wmost [open most.php w]set wmostdate [open mostdate.php w]gets $rmost lineif {[llength [chanlist $mychan]] &gt; $line} { set systemTime [clock seconds]puts $wmost "[llength [chanlist $mychan]]"puts $wmostdate "[clock format $systemTime -format {%b %d %Y}]"}close $rmostclose $wmostclose $wmostdate}</code></pre></div>Most Users doesn't work, it seems to work the same as current users. So when the channel users goes down, so does most users. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mad.gif" width="15" height="15" alt=":x" title="Mad"> <br><br>Also the part/sign bit isn't working.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5887">Longbow</a> — Tue Feb 22, 2005 12:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Longbow]]></name></author>
		<updated>2005-02-21T22:57:12-04:00</updated>

		<published>2005-02-21T22:57:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46842#p46842</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46842#p46842"/>
		<title type="html"><![CDATA[Listing All Users &amp; Counting Ops]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46842#p46842"><![CDATA[
Thanks.<br><br>Ok, this is my whole script..<br><div class="codebox"><p>Code: </p><pre><code>########## Total/Op/Voice/Users ##########bind join - * join:allproc join:all {nick uhost hand chan} {set mychan "#longbow"set wtotal [open total.php w]set wop [open op.php w]set wvoice [open voice.php w]set wusers [open users.php w]puts $wtotal "[llength [chanlist $mychan]]"set opcount 0foreach user [chanlist $mychan] { if {[isop $user $mychan]} {  incr opcount  }}puts $wop "$opcount"set voicecount 0foreach user [chanlist $mychan] { if {[isvoice $user $mychan]} {  incr voicecount  }}puts $wvoice "$voicecount"puts $wusers "[join [chanlist $mychan] {, }]"close $mychanclose $wtotalclose $wopclose $wvoiceclose $wusers}########## Most Users ##########bind join - * join:mostproc join:most {nick uhost hand chan} {set mychan "#longbow"set rmost [open most.php r]set wmost [open most.php w]set wmostdate [open mostdate.php w]gets $rmost lineif {[llength [chanlist $mychan]] &gt; $line} { set systemTime [clock seconds]puts $wmost "[llength [chanlist $mychan]]"puts $wmostdate "[clock format $systemTime -format {%b %d %Y}]"}close $mychanclose $rmostclose $wmostclose $wmostdateclose $line}</code></pre></div>But I get the following error:<br><blockquote class="uncited"><div>Tcl error [join:all]: can not find channel named "#longbow"<br>Tcl error [join:most]: can not find channel named "#longbow"</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5887">Longbow</a> — Mon Feb 21, 2005 10:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-02-21T20:47:04-04:00</updated>

		<published>2005-02-21T20:47:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46840#p46840</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46840#p46840"/>
		<title type="html"><![CDATA[Listing All Users &amp; Counting Ops]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46840#p46840"><![CDATA[
For counting the ops you can simply use:<br><div class="codebox"><p>Code: </p><pre><code>set count 0foreach user [chanlist $chan] { if {[isop $user $chan]} {  incr count  }}putserv "PRIVMSG $chan :Total number of ops: $count"</code></pre></div>You can do the same for voices and etc.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Feb 21, 2005 8:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-02-21T17:18:57-04:00</updated>

		<published>2005-02-21T17:18:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46837#p46837</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46837#p46837"/>
		<title type="html"><![CDATA[Listing All Users &amp; Counting Ops]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46837#p46837"><![CDATA[
<blockquote class="uncited"><div>Yeah I already done that, I was asking can I just use that for sign/part procs/binds aswell..</div></blockquote>Try it, do you see any reason not to ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon Feb 21, 2005 5:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Longbow]]></name></author>
		<updated>2005-02-21T17:13:12-04:00</updated>

		<published>2005-02-21T17:13:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46836#p46836</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46836#p46836"/>
		<title type="html"><![CDATA[Listing All Users &amp; Counting Ops]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46836#p46836"><![CDATA[
Yeah I already done that, I was asking can I just use that for sign/part procs/binds aswell..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5887">Longbow</a> — Mon Feb 21, 2005 5:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-02-21T17:11:49-04:00</updated>

		<published>2005-02-21T17:11:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46835#p46835</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46835#p46835"/>
		<title type="html"><![CDATA[Listing All Users &amp; Counting Ops]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46835#p46835"><![CDATA[
in your proc, replace:<div class="codebox"><p>Code: </p><pre><code>puts $thewritefile "[chanlist $chan]"</code></pre></div>with<div class="codebox"><p>Code: </p><pre><code>puts $thewritefile "[join [chanlist $chan] {, }]"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Mon Feb 21, 2005 5:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Longbow]]></name></author>
		<updated>2005-02-21T16:22:17-04:00</updated>

		<published>2005-02-21T16:22:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46833#p46833</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46833#p46833"/>
		<title type="html"><![CDATA[Listing All Users &amp; Counting Ops]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46833#p46833"><![CDATA[
What would I use for for the same script but binded with sign and part?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5887">Longbow</a> — Mon Feb 21, 2005 4:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2005-02-21T15:17:32-04:00</updated>

		<published>2005-02-21T15:17:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46831#p46831</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46831#p46831"/>
		<title type="html"><![CDATA[Listing All Users &amp; Counting Ops]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46831#p46831"><![CDATA[
No, <a href="http://www.tcl.tk/man/tcl8.5/TclCmd/join.htm" class="postlink">join</a> only put together several list elements into a single string.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Mon Feb 21, 2005 3:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Longbow]]></name></author>
		<updated>2005-02-21T15:01:17-04:00</updated>

		<published>2005-02-21T15:01:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46829#p46829</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46829#p46829"/>
		<title type="html"><![CDATA[Listing All Users &amp; Counting Ops]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46829#p46829"><![CDATA[
Mmmm.... indeed that does, but whats the join there for?<br><br>Does that mean I don't need the bind join / proc?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5887">Longbow</a> — Mon Feb 21, 2005 3:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2005-02-21T13:37:20-04:00</updated>

		<published>2005-02-21T13:37:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46827#p46827</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46827#p46827"/>
		<title type="html"><![CDATA[Listing All Users &amp; Counting Ops]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46827#p46827"><![CDATA[
This should take care of both problems<div class="codebox"><p>Code: </p><pre><code>puts $thewritefile "[join [chanlist $chan] {, }]"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Mon Feb 21, 2005 1:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Longbow]]></name></author>
		<updated>2005-02-21T13:27:19-04:00</updated>

		<published>2005-02-21T13:27:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=46826#p46826</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=46826#p46826"/>
		<title type="html"><![CDATA[Listing All Users &amp; Counting Ops]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=46826#p46826"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>puts $thewritefile "[chanlist $chan]"</code></pre></div>Ok that writes all the current users in the channel to $mywritefile, there are 2 problems though..<br><br>1. For people using [ ] in there name, it will output { } around there name..<br><br>Example..<blockquote class="uncited"><div>[Clan]Name</div></blockquote>Turns to.. <blockquote class="uncited"><div>{[Clan]Name}</div></blockquote>2. How would I go about putting a comma after each name.<br><br>Now for counting Ops i'm guessing it's going to use the 3 bits of code below, but I don't know how I would do it.<br><div class="codebox"><p>Code: </p><pre><code>if {[isop $nick $chan]}[llength [chanlist #clantemplates]]foreach nick [chanlist $chan]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5887">Longbow</a> — Mon Feb 21, 2005 1:27 pm</p><hr />
]]></content>
	</entry>
	</feed>
