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

	<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-08-23T22:16:19-04:00</updated>

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

		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-08-23T22:16:19-04:00</updated>

		<published>2006-08-23T22:16:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65755#p65755</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65755#p65755"/>
		<title type="html"><![CDATA[covert codes to html]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65755#p65755"><![CDATA[
I already wrote mirc-colors-to-html converter for some guy a while ago, you could have found it with a simple forum search for "color html"<br><br>anyway, here it is again:<br><div class="codebox"><p>Code: </p><pre><code>proc mirc2html str {   set re {([\002\017\026\037]|[\003]{1}[0-9]{0,2}[\,]{0,1}[0-9]{0,2})}array   set colors { 0 white   1 black    2 navy    3 green                4 red     5 maroon   6 purple  7 olive                8 yellow  9 lime    10 teal   11 aqua               12 blue   13 fuchsia 14 gray   15 silver}   set numtags 0; set bold 0   while {[regexp -indices $re $str -&gt; idxs]} {      set b [lindex $idxs 0]      set e [lindex $idxs 1]      set sub [string range $str $b $e]      switch [string index $sub 0] {         "\002" {            if !$bold {               set tag "&lt;span style=\"font-weight:bold\"&gt;"               set bold 1            } {               set tag "&lt;span style=\"font-weight:normal\"&gt;"               set bold 0            }            incr numtags         }         "\017" {            set tag [string repeat "&lt;/span&gt;" $numtags]            set numtags 0         }         "\026" {            set tag [string repeat "&lt;/span&gt;" $numtags]                        append tag "&lt;span style=\"color:white;background-color:black\"&gt;"            set numtags 1         }         "\037" {            set tag "&lt;span style=\"text-decoration:underline\"&gt;"            incr numtags         }         "\003" {            set fg [lindex [split [string range $sub 1 e] ,] 0]            set bg [lindex [split [string range $sub 1 e] ,] 1]            if {$fg != "" || $bg != ""} {               if {$fg &gt; 15 || $bg &gt; 15} {                  set tag "&lt;span&gt;"               } elseif {$fg != "" &amp;&amp; $bg != ""} {                  set tag "&lt;span style=\"color:$colors($fg);background-color:$colors($bg)\"&gt;"               } elseif {$fg != "" &amp;&amp; $bg == ""} {                  set tag "&lt;span style=\"color:$colors($fg)\"&gt;"               } else {                  set tag "&lt;span style=\"background-color:$colors($bg)\"&gt;"               }               incr numtags            } {               set tag [string repeat "&lt;/span&gt;" $numtags]               set numtags 0            }         }      }      set str [string replace $str $b $e $tag]   }   append str [string repeat "&lt;/span&gt;" $numtags]   return $str} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Aug 23, 2006 10:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-08-23T17:41:19-04:00</updated>

		<published>2006-08-23T17:41:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65753#p65753</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65753#p65753"/>
		<title type="html"><![CDATA[covert codes to html]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65753#p65753"><![CDATA[
Try regsub.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Wed Aug 23, 2006 5:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Savage_Garden]]></name></author>
		<updated>2006-08-23T16:02:29-04:00</updated>

		<published>2006-08-23T16:02:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65747#p65747</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65747#p65747"/>
		<title type="html"><![CDATA[covert codes to html]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65747#p65747"><![CDATA[
Hello, sorry if this has been asked before but i didnt meet such a topic. My problem is that i am writing a tcl for online stats and i am logging whats going on in the channel in chat.txt. Next i write a html using that file, but the problem is in the .txt file where there are lines with bold, reverse, underline or color, such as:<br>1156356695 quit LaM3r43t0 admin@84.238.171.248 Quit: 4? 9Club Xtazy ? 11Script ? 4Download ? w15ww.15styni.HiT.9bG ?<br>on the .html file they dont appear colored, underlined, etc.<br>I hope you understand what my problem is and you can help me. I need a procedure that would fix that effect.<br><br>Thanks in advantage.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8121">Savage_Garden</a> — Wed Aug 23, 2006 4:02 pm</p><hr />
]]></content>
	</entry>
	</feed>
