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

	<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-02-24T21:24:32-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-02-24T21:24:32-04:00</updated>

		<published>2007-02-24T21:24:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70694#p70694</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70694#p70694"/>
		<title type="html"><![CDATA[Listing Users in a channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70694#p70694"><![CDATA[
This forum is concerned with Eggdrop Tcl scripts and not php. <a href="http://forum.egghelp.org/viewtopic.php?t=13155" class="postlink">Here</a> you'll find a Tcl code which will save the nick list of each channel in a file.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Feb 24, 2007 9:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Night_Prowler]]></name></author>
		<updated>2007-02-24T16:38:41-04:00</updated>

		<published>2007-02-24T16:38:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70685#p70685</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70685#p70685"/>
		<title type="html"><![CDATA[Listing Users in a channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70685#p70685"><![CDATA[
I've been searching trying to find a tcl script that will allow me to list users in my IRC channel, and export the data to a text file. I have foun several, but I havent yet to get anything to work. One I did find, has two parts, the tcl script, which exports the data to a text file, and a php script that reads the text file. the tcl script works "I think" and exports to a text file, but the php script I cant figure out. Below are the two parts, any help would be greately appchiated, or if you know of something maybe more simple that would be great! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile">)<br><br>Thanks<br>Night_Prowler<br><br><strong class="text-strong">The TCLScript:</strong><div class="codebox"><p>Code: </p><pre><code>set i2h_htmlfile "/var/www/html/Chat/users.txt"set i2h_chan "#STK"set i2h_text "#000000"set maxupdate 60bind join - "$i2h_chan %" i2h:makebind kick - "$i2h_chan %" i2h:makebind nick - "$i2h_chan %" i2h:make proc i2h:make {args} {  global i2h_htmlfile i2h_chan i2h_text server maxupdate   set i2h_file [open $i2h_htmlfile w]  set online [chanlist $i2h_chan]  set count [llength $online]  set users [lindex $online 0]  set users "[nick2hand $users $i2h_chan]users"  for {set i 1} {$i &lt; $count} {incr i 1} {     set user [lindex $online $i]  set ch_text [getchanhost $user]  regsub -all \@.* $ch_text "" ch_text  regsub -all ~ $ch_text "" ch_text     set users "$users%20[nick2hand $user]%20$ch_text%20$user"  }  puts $i2h_file "$users&lt;br&gt;\n"  close $i2h_fileif {[utimerexists ""] == ""} {utimer $maxupdate i2h:make}  return 1}proc utimerexists {i2h:make} {  foreach j [utimers] {if {[string compare [lindex $j 1] i2h:make] == 0} {return [lindex $j 2]}}  return}proc i2h:convert {i2h_text} {  #Strip control codes.. sorta  regsub -all . $i2h_text "" i2h_text  regsub -all . $i2h_text "" i2h_text  regsub -all . $i2h_text "" i2h_text  regsub -all . $i2h_text "" i2h_text  regsub -all . $i2h_text "" i2h_text  #Convert special chars  regsub -all &amp; $i2h_text "\&amp;" i2h_text  regsub -all \" $i2h_text "\"" i2h_text  regsub -all &lt; $i2h_text "\&lt;" i2h_text  regsub -all &gt; $i2h_text "\&gt;" i2h_text  regsub -all "  " $i2h_text " \ " i2h_text  return $i2h_text}i2h:makeutlog "IRC Bot nick list loaded."</code></pre></div><strong class="text-strong">The PHP Scipt</strong><br><div class="codebox"><p>Code: </p><pre><code>&lt;?$onlinefile = "http://chat.hl2stk.net/~jgriggs/users.txt";$killname = array("bot", "_$");$httpfaulttime = 5;function urlExists($url){$url = ereg_replace("http://", "", $url);list($domain, $file) = explode("/", $url, 2);$fid=fsockopen($domain,80, $errno1, $errstr1,$httpfaulttime);@fputs($fid,"GET /$file HTTP/1.0\r\nHost: $domain\r\n\r\n");@$gets = fgets($fid, 1024);@fclose($fid);if (ereg("HTTP/1.1 200 OK", $gets)) return true;else return false;}   if (!urlExists($onlinefile)) {        $chatterson ="Error Getting User List.\n";        $onlineirc="0";        } else {$file = fopen($onlinefile, "r");while (!feof($file)) {        $buffer .= fgets($file, 4096);}        fclose($file);$buffer = strip_tags ($buffer); $buffer = chop($buffer);$chatterson ="";        $temparray = explode ("%20", $buffer);        $temparraysize = sizeof ($temparray);$k = 0;for ($i = 0; $i &lt; $temparraysize; $i+=3) {$bufferarray[handle1][$k] = ($temparray[$i]);$bufferarray[host][$k] =  ($temparray[$i+1]);$bufferarray[nick][$k] = ($temparray[$i+2]);$k+=1;}        $bufferarraysize = (sizeof ($temparray)/3);        $onlineirc = ($bufferarraysize);        $buffercount=0;        for  ($buffercount=0; $buffercount &lt; $bufferarraysize; $buffercount++) {                        $tempbuff=$bufferarray[nick][$buffercount];                foreach ($killname as $kilvalue) {                        if (eregi($kilvalue, $tempbuff)) {                $onlineirc=$onlineirc-1;                $bufferarray[nick][$buffercount] = "";                continue ;                }  }  }unset($chatterson); for ($i = 0; $i &lt; $bufferarraysize; $i++) {        if (!$bufferarray[nick][$i] == "") {        if (!$chatterson == "") {        $chatterson = $chatterson.", ".$bufferarray[nick][$i];        }        else { $chatterson = $bufferarray[nick][$i]; }        }}}echo "&lt;tr&gt;&lt;td colspan=\"3\" bgcolor=\"#FFFFFF\"&gt;&lt;font color=\"#FF6600\" size=\"1\"&gt;&lt;div align=\"center\"&gt;&lt;b&gt;$chatterson&lt;/div&gt;&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td width=\"33%\" bgcolor=\"#FFFFFF\"&gt;&lt;font color=\"#000000\"&gt;&lt;b&gt;&lt;div align=\"center\"&gt;Total Number of Users:&lt;/b&gt;&lt;/font&gt;&lt;/a&gt;&lt;font color=\"#000000\"&gt;&lt;b&gt; $onlineirc&lt;/div&gt;&lt;/td&gt;&lt;td width=\"34%\" bgcolor=\"#FFFFFF\"&gt;&lt;div align=\"center\"&gt;&lt;b&gt;&lt;a href=\"jIRC+main.html\" target=\"_blank\"&gt;Click Here to Connect.&lt;/div&gt;&lt;/b&gt;&lt;/td&gt;&lt;td width=\"33%\" bgcolor=\"#FFFFFF\"&gt;&lt;div align=\"center\"&gt;&lt;b&gt;&lt;a href=\"irc://irc.ircserver.com:6667/Channelname\"&gt;#Channelname on irc.ircserver.com:6667&lt;/a&gt;&lt;/div&gt;&lt;/b&gt;&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;";?&gt;</code></pre></div><strong class="text-strong">The Text Output</strong><blockquote class="uncited"><div>On channel #STK<br>STKBot<br>Juston</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8740">Night_Prowler</a> — Sat Feb 24, 2007 4:38 pm</p><hr />
]]></content>
	</entry>
	</feed>
