This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

irc2html

Old posts that have not been replied to for several years.
Locked
d
darkie
Voice
Posts: 20
Joined: Sun Feb 23, 2003 4:50 am

irc2html

Post by darkie »

For those who remember, I needed a script to convert mIRC colour codes to HTML, and stdragon made one that didn't support background colours, I have now made one that does.

it is available at http://csusap.csu.edu.au/~amason09/irc2html.tcl.gz and (like most other TCL scripts out there) it is free to use.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

...or you could try the one I made but never tested :P
http://forum.egghelp.org/viewtopic.php?t=3926#17997
Have you ever read "The Manual"?
d
darkie
Voice
Posts: 20
Joined: Sun Feb 23, 2003 4:50 am

Post by darkie »

It works... but it produces bulky code with redundant tags. Mine does not (although the code produced may not be XML compatible)
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

You still have some work to do...

Post by user »

darkie wrote:It works... but it produces bulky code with redundant tags. Mine does not (although the code produced may not be XML compatible)
There's lots of stuff you seem to be ignoring in your version..like keeping the background color (unless reset by a \003 or \017), keeping both colors through reversed parts etc...

Converting: "\037\00301,04\002a\00319b\026\037\002c\026d\003e"

Yours (almost total failure): <u><span style='color: #000000; background: #FF0000;'><b>a</span><span style='color: #FFFFFF;'>b<a style='color: #FFFFFF; background: #000000'><b>c<a style='color: #FFFFFF; background: #000000'>de</></span>

Mine (correct, but some redundant tags): <span style="text-decoration: underline"></span><span style="text-decoration: underline; color: #000; background-color: #F00"></span><span style="font-weight: bold; text-decoration: underline; color: #000; background-color: #F00">a</span><span style="font-weight: bold; text-decoration: underline; color: #009300; background-color: #F00">b</span><span style="font-weight: bold; text-decoration: underline; color: #FFF; background-color: #000"></span><span style="font-weight: bold; color: #FFF; background-color: #000"></span><span style="color: #FFF; background-color: #000">c</span><span style="color: #009300; background-color: #F00">d</span>e

Mine (with new regsub at the end): <span style="font-weight: bold; text-decoration: underline; color: #000; background-color: #F00">a</span><span style="font-weight: bold; text-decoration: underline; color: #009300; background-color: #F00">b</span><span style="color: #FFF; background-color: #000">c</span><span style="color: #009300; background-color: #F00">d</span>e

I could probably rewrite my script to be more efficient, but people who like colors on irc tend to like scripts that suck, so why bother :P
Have you ever read "The Manual"?
d
darkie
Voice
Posts: 20
Joined: Sun Feb 23, 2003 4:50 am

Post by darkie »

One question: what does colour code 19 refer to? My script gives any colour code other than 0-15 and 99 a RGB reading of FFFFFF. if mIRC converts that into green, then I will fix it. But since I don't have a copy of mIRC available at this present time, I will have to review this later.

EDIT: Also, I see that the change from one colour code to another erases the previous background setting if none is given the second time. This will be fixed in a later version.
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

darkie wrote:One question: what does colour code 19 refer to?

Code: Select all

if {$colorNumber!=99} {set colorNumber [expr {$colorNumber%16}]}
Have you ever read "The Manual"?
Locked