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

	<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>2003-06-21T18:02:30-04:00</updated>

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

		<entry>
		<author><name><![CDATA[spyda]]></name></author>
		<updated>2003-06-21T18:02:30-04:00</updated>

		<published>2003-06-21T18:02:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22334#p22334</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22334#p22334"/>
		<title type="html"><![CDATA[Good idea... But try this!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22334#p22334"><![CDATA[
With what you have said about your problem, I did a sort file for my trivia chan and i used this method.<br><div class="codebox"><p>Code: </p><pre><code>  set ofile [open $filename r]  set ranks [lsort -dict -decreasing [split [gets $ofile]]]  close $ofile</code></pre></div>With using this code. You will need to change the way the data is entered in the file...<br><blockquote class="uncited"><div>Meks.....<br><br>i got a file where all users and their points are logged in this way: <br>nick|hostmask|points </div></blockquote>Cause the coding will sort from the biggest to the smallest number.. Change the format to <strong class="text-strong">points|nick|uhost</strong>.<br><br>Note: When i made my  top100 list.. I made the TXT file, LINE BY LINE. I found out latter on the it would make the file quite big. So you might want to have a look into making it one long string.<br><br>eg. <strong class="text-strong">553|Meks|<a href="mailto:there@there.com">there@there.com</a> 400|ThePope|<a href="mailto:home@home.com">home@home.com</a> 350|Bot|<a href="mailto:Bot@bot.com">Bot@bot.com</a> </strong><br><br>Hope that Helps.<br>-----------<br>ThePope[/b]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1731">spyda</a> — Sat Jun 21, 2003 6:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[meks]]></name></author>
		<updated>2003-06-21T14:31:34-04:00</updated>

		<published>2003-06-21T14:31:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=22325#p22325</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=22325#p22325"/>
		<title type="html"><![CDATA[highscores]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=22325#p22325"><![CDATA[
hi!<br><br>ive build a script which allows people from a list to give points to other people (even if the receivers are not on the list).<br><br>well - this script is working fine and without any problems. now i thought i could make a highscore-list. so i started to code such a thing.<br>now - about 24h later i gave it up.<br><br>i got a file where all users and their points are logged in this way:<br>nick|hostmask|points<br>so i thought i could create a ranking by simply checking each entry against the others. if the current entry has more points than another, simply increase the rank by one, and otherwise decrease by one.<br><br>well. no. it doesnt work at all.<br><br>so my question is quite clear - what's the simplest way to create a ranking?<br>i can remeber of keyed arrays like in php, where each entry of an array got a key and if you sort the array by its values you can afterwards do a ranking with ease. but thats not possible in tcl afaik?<br><br>so...please help me <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=3310">meks</a> — Sat Jun 21, 2003 2:31 pm</p><hr />
]]></content>
	</entry>
	</feed>
