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.

Log converter [SOLVED]

General support and discussion of Eggdrop bots.
Post Reply
t
tueb
Halfop
Posts: 76
Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:

Log converter [SOLVED]

Post by tueb »

Hi,

does anyone here have a (non-tcl) script which converts my eggdrop-logs for my homepage? for example changes the color-codes into html?

thx in advance,

tadadadaaa
Last edited by tueb on Wed Oct 24, 2007 9:13 am, edited 1 time in total.
User avatar
CrazyCat
Revered One
Posts: 1299
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

I've a php script to transform mirc texts into html, peharps you can use it?
t
tueb
Halfop
Posts: 76
Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:

Post by tueb »

yes, i believe thats exactly what i'm looking for!
User avatar
CrazyCat
Revered One
Posts: 1299
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

The php source is at http://www.c-p-f.org/wiki/index.php?title=Classes:Mirc

To use it, just do:

Code: Select all

echo mirc2html($mycoloredtext);
t
tueb
Halfop
Posts: 76
Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:

Post by tueb »

thx =D
User avatar
CrazyCat
Revered One
Posts: 1299
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

If you need explanations or help to adapt it, you can ask me :)
t
tueb
Halfop
Posts: 76
Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:

Post by tueb »

actually, there is one thing.

I got it up and running http://www.moxquiz.de/docs.php?id=53, but it doesn't show the empty spaces correctly. Do you have an idea how to fix that? :?


thx
User avatar
CrazyCat
Revered One
Posts: 1299
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

could you give me an example of the source line and the corresponding html line please?
I guess it's a particular char wich might be replaced.
t
tueb
Halfop
Posts: 76
Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:

Post by tueb »

(wrote the same post twice o0)
Last edited by tueb on Thu Oct 25, 2007 7:29 am, edited 1 time in total.
t
tueb
Halfop
Posts: 76
Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:

Post by tueb »

I pretty much read out everly line of the log:
[00:46] <MoxQuizBot> 06,00{MoxQuizz} 02,11Tipp 3:
[00:46] <MoxQuizBot> 12,00··a···
[00:46] <MoxQuizBot> 06,00{MoxQuizz} 02,11Tipp 4:
and put it through your code:

Code: Select all

     $logfile = $_POST["logans"];
     $file = "/home/eggdrop/stats/channellogs/$logfile";


           $userdatei = fopen("$file","r");

                   while(!feof($userdatei))
                   {
                      $zeile = fgets($userdatei,10024);
                      echo mirc2html($zeile); //i didn't change the mirc2html-function
                      print "<br />";
                   }


                   print "</div></div>";
            fclose($userdatei);

    }
but in the output the spaces are "lost": http://www.moxquiz.de/docs.php?id=53

thx =)
User avatar
CrazyCat
Revered One
Posts: 1299
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Peharps you may replace the line:

Code: Select all

return str_replace("\3",'',$tmp);
with

Code: Select all

return $tmp
t
tueb
Halfop
Posts: 76
Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:

Post by tueb »

sry, that didn't work. (even after i added the ";" :P )
Post Reply