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

	<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-05-16T16:11:54-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-05-16T16:11:54-04:00</updated>

		<published>2006-05-16T16:11:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63096#p63096</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63096#p63096"/>
		<title type="html"><![CDATA[Logging number of users to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63096#p63096"><![CDATA[
This is because when part is triggered, the user is still on the channel. just give your proc a hint if it was a part and then expr -1 the totalusers.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Tue May 16, 2006 4:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Doos]]></name></author>
		<updated>2006-05-16T11:31:08-04:00</updated>

		<published>2006-05-16T11:31:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63091#p63091</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63091#p63091"/>
		<title type="html"><![CDATA[Logging number of users to file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63091#p63091"><![CDATA[
Hi all,<br><br>I created the following file (with some stolen code). The purpose is to count the number of users in a channel and write that to a file.<br>It does update the number of people in chat when they join nicely, but not when someone leaves the channel. Could someone comment on it as I'm very poor at TCL.<br><div class="codebox"><p>Code: </p><pre><code>set cc_outptpath "/home/doos/"set cc_outptfile "whoisonline.txt"# $cc_chanlist# List of channels to monitor (ommit #)set cc_chanlist {go}bind join - * cc_joinbind part - * cc_partbind sign - * cc_signbind kick - * cc_kickbind splt - * cc_splitproc cc_countusers {chan} {  global cc_outptfile cc_outptpathset totalusers [llength [chanlist #go]]  set c [catch {set fd [open "$cc_outptpath$chan.$cc_outptfile" w]} reason]puts $fd $totalusers  catch {close $fd}  return 0}proc cc_join {nick uhost handle chan} {  regsub -all "\#" $chan "" chan  global cc_chanlist  if {[lsearch $cc_chanlist $chan] != -1} {cc_countusers $chan}#puthelp "PRIVMSG #go :Doos is an idiot."  return 0}proc cc_part {nick uhost handle chan msg} {  regsub -all "\#" $chan "" chan  global cc_chanlist  if {[lsearch $cc_chanlist $chan] != -1} {cc_countusers $chan}  return 0}proc cc_sign {nick uhost handle chan msg} {  regsub -all "\#" $chan "" chan  global cc_chanlist  if {[lsearch $cc_chanlist $chan] != -1} {cc_countusers $chan}  return 0}proc cc_kick {nick uhost handle chan msg} {  regsub -all "\#" $chan "" chan  global cc_chanlist  if {[lsearch $cc_chanlist $chan] != -1} {cc_countusers $chan}  return 0}proc cc_split {nick uhost handle chan msg} {  regsub -all "\#" $chan "" chan  global cc_chanlist  if {[lsearch $cc_chanlist $chan] != -1} {cc_countusers $chan}  return 0}# Check for a QUITproc hung_up {nick uhost handle chan msg} {  regsub -all "\#" $chan "" chan  global cc_chanlist  if {[lsearch $cc_chanlist $chan] != -1} {cc_countusers $chan}  return 0}putlog "\002WHOSONLINE:\002 countlist.tcl Version1 is loaded."</code></pre></div>Thanks in advance.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6449">Doos</a> — Tue May 16, 2006 11:31 am</p><hr />
]]></content>
	</entry>
	</feed>
