egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Log converter [SOLVED]

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Sat Oct 20, 2007 5:58 am    Post subject: Log converter [SOLVED] Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Sat Oct 20, 2007 7:04 am    Post subject: Reply with quote

I've a php script to transform mirc texts into html, peharps you can use it?
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Sat Oct 20, 2007 8:40 am    Post subject: Reply with quote

yes, i believe thats exactly what i'm looking for!
Back to top
View user's profile Send private message Visit poster's website
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Tue Oct 23, 2007 12:25 pm    Post subject: Reply with quote

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

To use it, just do:
Code:
echo mirc2html($mycoloredtext);

_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Tue Oct 23, 2007 1:35 pm    Post subject: Reply with quote

thx =D
Back to top
View user's profile Send private message Visit poster's website
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Tue Oct 23, 2007 4:17 pm    Post subject: Reply with quote

If you need explanations or help to adapt it, you can ask me Smile
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Wed Oct 24, 2007 11:35 am    Post subject: Reply with quote

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? Confused


thx
Back to top
View user's profile Send private message Visit poster's website
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Wed Oct 24, 2007 12:07 pm    Post subject: Reply with quote

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.
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Thu Oct 25, 2007 7:22 am    Post subject: Reply with quote

(wrote the same post twice o0)

Last edited by tueb on Thu Oct 25, 2007 7:29 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Thu Oct 25, 2007 7:24 am    Post subject: Reply with quote

I pretty much read out everly line of the log:

Quote:
[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:
     $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 =)
Back to top
View user's profile Send private message Visit poster's website
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Thu Oct 25, 2007 11:59 am    Post subject: Reply with quote

Peharps you may replace the line:
Code:
return str_replace("\3",'',$tmp);

with
Code:
return $tmp

_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Thu Oct 25, 2007 12:21 pm    Post subject: Reply with quote

sry, that didn't work. (even after i added the ";" Razz )
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber