friends don't let friends post raw irc logs

<jwz> you know, I really wish those of you who insist on pasting IRC logs to your LJ would at least take the time to make them not be completely unreadable

for example, by running them through first
<rjn> ooh..
<jwz> someone share with us some typically spectacular irc wit so that I have an example to post, please
<uhtu>   STFU L4M3R HAHAH j000 sux0r!
Tags: ,

10 Responses:

  1. feren says:

    Behold the power of regexp and globbing.

  2. icis_machine says:

    surprisingly no one has this problem on 'talk'.
    wonder why.

    • bdu says:

      because noone uses it.

      • yakko says:

        You certainly got that right. . .

        I remember trying to use talk in 1996, when our little channel was on (maybe because there was loads of lag, even back then? hrrm...) ... but I'd gotten so used to IRC that I ended up downloading dal4 and compiling my own ircd, and had the person who I was talking to connect.

  3. ralesk says:

       Hahahah, I love it already! :]

  4. atakra says:

    Y0u sp3nd 700 much 7im3 0n 7h3 c0mpu70r.
    J0in 4 gym.

  5. insomnia says:

    Nifty little hack, but most people don't mess with perl scripts.

    If you really want others to use it, give them a URL where they can paste their IRC logs, and which will return nice clean html that they can paste into their journal/blog/etc.

  6. reify says:


    I'm using Trillian, and I got your script to work with Trillian log excerpts with a slight modification to allow spaces in my username. This alteration may cause breakage when used on real IRC logs.

    *** Thu Oct 17 22:33:43 2002
    --- Thu Oct 17 23:02:17 2002
    *** 184,190 ****
    } elsif (m@^(\[ *[^\]]+\]) (.*)$@s) {
    $head = $1;
    $body = $2;
    ! } elsif (m@^([^\[\]<> \t\n:]+:) (.*)$@s) {
    $head = $1;
    $body = $2;
    } elsif (m@^(>) (.*)$@s) {
    --- 184,190 ----
    } elsif (m@^(\[ *[^\]]+\]) (.*)$@s) {
    $head = $1;
    $body = $2;
    ! } elsif (m@^([^\[\]<>\t\n:]+:) (.*)$@s) {
    $head = $1;
    $body = $2;
    } elsif (m@^(>) (.*)$@s) {