Skip navigation.

Blog

Skip the blog side panel.

On 23rd of April 2015, Mihai Șucan passed away due to metastatic cancer caused by RDEB.

My name is Mihai and I work on the Firefox developer tools. When it comes to web development, I like both server-side and client-side work. I am mainly interested in web browsers, web standards and related technologies.

Opera Chat log analyzer

Hello!

Did you know you can enable logging in Opera Chat? It works with Opera 8 and 9. Perhaps with Opera 7 too (I am not sure).

To enable logging for Opera Chat edit your mail/accounts.ini file and add/change:

Incoming Log File=c:\path\to\your_file.log

... for the [account] you want.

The generated log is debug mode, almost unreadable by humans. Plus, it's a single file: no separate files for private messages or channels.

Because of this I have made script that parses the log and generates human readable files.

One tiny problem: Opera does not include the log start/end date (only the time), which forces me to guess the log date. Log date guessing works by catching all UNIX timestamps sent by the IRC server, user signon, topic date, etc.

The script creates files for private chats, channels and one $server file

For one file of 166.4 MB on AMD Duron 1.3ghz 512MB RAM with 7200 RPM HDD running Ubuntu 6.06 Linux, PHP 5.1.2 ... parsing took about 5 minutes. The script generated 135 files (12.3 MB). Average speed: 502 KB/s.

For this release I have optimized the code for better speed, initially this script was 3 times slower.

The script was tested on irc.opera.com and irc.freenode.net.

The output is text, not HTML.

Generally the script should run fine, but you can easily brake it. If you improve the script please send the updated file to me.

You need only PHP, nothing else. It probably works with PHP 4 too (I only tested with PHP 5.1).

Download the script.

Rename the file to .php. Uploaded as .txt to avoid conflicts.

Thanks and let me know if you find this useful. Any comments suggestions are welcome!