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

	<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>2002-10-13T03:07:14-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Souperman]]></name></author>
		<updated>2002-10-13T03:07:14-04:00</updated>

		<published>2002-10-13T03:07:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11936#p11936</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11936#p11936"/>
		<title type="html"><![CDATA[An addition to trivia.tcl case you don't like the HTML]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11936#p11936"><![CDATA[
Hey, it looks pretty good.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> Very nice for integrating into the rest of your site.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=801">Souperman</a> — Sun Oct 13, 2002 3:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-18T09:18:08-04:00</updated>

		<published>2002-09-18T09:18:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11061#p11061</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11061#p11061"/>
		<title type="html"><![CDATA[An addition to trivia.tcl case you don't like the HTML]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11061#p11061"><![CDATA[
Oh in case you want to see a preview check <a href="http://axe4.axenet.org/index.php?page=stats/trivia" class="postlink">http://axe4.axenet.org/index.php?page=stats/trivia</a><p>Statistics: Posted by Guest — Wed Sep 18, 2002 9:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-18T09:12:30-04:00</updated>

		<published>2002-09-18T09:12:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11060#p11060</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11060#p11060"/>
		<title type="html"><![CDATA[An addition to trivia.tcl case you don't like the HTML]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11060#p11060"><![CDATA[
I took the liberty to edit the TCL script (trivia.tcl) by adding a somewhat nicer and more configurable HTML output as the old output its well, pretty basic. Anyway here it is:<br><br>At the top of the code<div class="codebox"><p>Code: </p><pre><code># Table Colorsset tgbcolor "#000000"       ;#Border Colorset tgcellcolor "#EDE7E7"    ;#Cell colorset tgcellcolor_top "FFE1B5" ;# Table Head color# Java chat available?set tgjavachat "1" ;# 0 is no java chat, 1 is javachatset tgjavaurl "http://axe4.axenet.org/index.php?page=chat&amp;channel=trivia" ;# Url to point to</code></pre></div>In stead of the old proc tghtml<br><div class="codebox"><p>Code: </p><pre><code>proc tghtml {} { global tgchan botnick tghtmlfile tghtmlrefresh server tgscoresbyname tgranksbyname global tgscorestotal tgranksbyname tgrealnames tgscoresbyrank tgranksbynum tgplaying global tgquestionstotal tghtmlrefreshtimer tghtmlfont  global tgbcolor tgcellcolor tgcellcolor_top tgjavachat tgjavaurl tggetscores tgreadqdb set _file [open $tghtmlfile~new w] puts $_file "&lt;!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"&gt;" puts $_file "&lt;html&gt;" puts $_file " &lt;head&gt;" puts $_file "  &lt;title&gt;$botnick's trivia channel: $tgchan on [lindex [split $server :] 0]&lt;/title&gt;" puts $_file "  &lt;meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"&gt;" puts $_file "  &lt;meta http-equiv=\"refresh\" content=\"$tghtmlrefresh\"&gt;" puts $_file "  &lt;meta name=\"generator\" content=\"trivia.tcl script for eggdrop. http://www.eggdrop.za.net/\"&gt;" puts $_file " &lt;/head&gt;" puts $_file " &lt;body&gt;" puts $_file "  &lt;table cellspacing=4 cellpadding=4 border=0 align=center&gt;&lt;tr&gt;&lt;td&gt;" puts $_file " &lt;b&gt;&lt;font face=\"Verdana\" size=\"3\"&gt;Trivia Statistics for $tgchan on [lindex [split $server :] 0]&lt;/font&gt;&lt;/b&gt;&lt;br&gt;&lt;font face=\"Verdana\" size=\"3\"&gt;&lt;b&gt;Generated on [strftime %A,\ %d\ %B\ %Y\ @\ %H:%M:%S]&lt;/b&gt;&lt;/font&gt;&lt;br&gt;" if {$tgjavachat&gt;0} {  puts $_file " &lt;a href=\"$tgjavaurl\"&gt;Play Now!&lt;/a&gt;" } puts $_file " &lt;HR ALIGN=LEFT NOSHADE SIZE=1 WIDTH=480&gt;" if {![onchan $botnick $tgchan]} {  puts $_file "  &lt;p&gt;Hmmm... for some reason I'm not on $tgchan at the moment. Please try again later.&lt;/p&gt;" } else {  puts $_file "  &lt;p&gt;Trivia game is currently &lt;b&gt;[expr $tgplaying==1?"on":"off"]&lt;/b&gt;. There are &lt;b&gt;$tgquestionstotal&lt;/b&gt; questions in the database."  puts $_file "  &lt;p&gt;&lt;b&gt;People on $tgchan right now:&lt;/b&gt;&lt;br&gt;&lt;br&gt;"  puts $_file "  &lt;table width=\"100%\" cellspacing=\"1\" cellpadding=\"3\" border=\"0\" bgcolor=\"$tgbcolor\"&gt;"  puts $_file "   &lt;tr&gt;"  puts $_file "    &lt;td bgcolor=\"$tgcellcolor_top\"&gt;&lt;b&gt;Nick&lt;/b&gt;&lt;/td&gt;"  puts $_file "    &lt;td bgcolor=\"$tgcellcolor_top\"&gt;&lt;b&gt;Score&lt;/b&gt;&lt;/td&gt;"  puts $_file "    &lt;td bgcolor=\"$tgcellcolor_top\"&gt;&lt;b&gt;Rank&lt;/b&gt;&lt;/td&gt;"  puts $_file "    &lt;td bgcolor=\"$tgcellcolor_top\"&gt;&lt;b&gt;Idle&lt;/b&gt;&lt;/td&gt;"  puts $_file "   &lt;/tr&gt;"  foreach nick [lsort [chanlist $tgchan]] {   puts $_file "   &lt;tr&gt;"   puts $_file "    &lt;td bgcolor=\"$tgcellcolor\"&gt;[expr [isop $nick $tgchan]?"@":""][expr [ishalfop $nick $tgchan]?"%":""][expr [isvoice $nick $tgchan]?"+":""]$nick[expr [string match $nick $botnick]?" (that's me!)":""]&lt;/td&gt;"   if {[info exists tgscoresbyname([strlwr $nick])]} {    puts $_file "    &lt;td bgcolor=\"$tgcellcolor\"&gt;$tgscoresbyname([strlwr $nick])&lt;/td&gt;"   } else {    puts $_file "    &lt;td bgcolor=\"$tgcellcolor\"&gt;-&lt;/td&gt;"   }   if {[info exists tgranksbyname([strlwr $nick])]} {    puts $_file "    &lt;td bgcolor=\"$tgcellcolor\"&gt;$tgranksbyname([strlwr $nick])&lt;/td&gt;"   } else {    puts $_file "    &lt;td bgcolor=\"$tgcellcolor\"&gt;-&lt;/td&gt;"   }   puts $_file "   &lt;td bgcolor=\"$tgcellcolor\"&gt;[expr [getchanidle $nick $tgchan]&gt;10?"[getchanidle $nick $tgchan]m":"-"]&lt;/td&gt;"   puts $_file "   &lt;/tr&gt;"  }  puts $_file "  &lt;/table&gt;&lt;br&gt;&lt;br&gt;" } if {$tgscorestotal&gt;0} {  puts $_file "  &lt;center&gt;&lt;small&gt;There [expr $tgscorestotal==1?"is":"are"] currently &lt;b&gt;$tgscorestotal&lt;/b&gt; [expr $tgscorestotal==1?"nick":"nicks"] in the score table:&lt;/small&gt;&lt;/center&gt;&lt;br&gt;"  set _rank 1  puts $_file " &lt;table cellspacing=\"1\" cellpadding=\"3\" bgcolor=\"$tgbcolor\" align=center&gt;&lt;tr&gt;&lt;td bgcolor=\"$tgcellcolor_top\"&gt;&lt;b&gt;Rank&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor=\"$tgcellcolor_top\"&gt;&lt;b&gt;Nickname&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor=\"$tgcellcolor_top\"&gt;&lt;b&gt;Score&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt; "  while {$_rank&lt;=$tgscorestotal} {   puts $_file "&lt;tr&gt;&lt;td bgcolor=\"$tgcellcolor\"&gt;&lt;b&gt;$_rank&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor=\"$tgcellcolor\"&gt;$tgrealnames($tgranksbynum($_rank))&lt;/td&gt;&lt;td bgcolor=\"$tgcellcolor\"&gt;$tgscoresbyrank($_rank)&lt;/td&gt;&lt;/tr&gt;"   incr _rank  }  puts $_file " &lt;/table&gt; " } else {  puts $_file "&lt;p&gt;&lt;small&gt;There are currently no nicks in the score table.&lt;/small&gt;&lt;/p&gt;&lt;br&gt;" } puts $_file "  &lt;HR ALIGN=LEFT NOSHADE SIZE=1 WIDTH=480&gt;" puts $_file "  &lt;small&gt;Generated on [strftime %A,\ %d\ %B\ %Y\ @\ %H:%M:%S] by &lt;a href=\"http://www.eggdrop.za.net/\" target=_blank&gt;trivia.tcl&lt;/a&gt; for &lt;a href=\"http://www.egghelp.org\"&gt;eggdrop&lt;/a&gt;.&lt;br&gt;" puts $_file "  This page is automatically updated every [expr $tghtmlrefresh==1?"second":"$tghtmlrefresh seconds"].&lt;/small&gt;" puts $_file " &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;" puts $_file "&lt;/html&gt;" close $_file file rename -force $tghtmlfile~new $tghtmlfile set tghtmlrefreshtimer [utimer $tghtmlrefresh tghtml]}</code></pre></div> <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br><br>----<br>CaliMonk <br>Network Administrator<br>Axenet IRC Network<p>Statistics: Posted by Guest — Wed Sep 18, 2002 9:12 am</p><hr />
]]></content>
	</entry>
	</feed>
