Newbie Spellweaver
- Joined
- May 5, 2009
- Messages
- 89
- Reaction score
- 124
This will convert your chat logs files into a human readable format. You will need to do several options. Once again, my idea, written by me and Angels and Demons admin.
1. Script to convert the chat logs for file reading and conversion.
2. Website to convert logs, you will need to truncate the log files every couple of days or it gets MASSIVE!
SQL structure
1. Script to convert the chat logs for file reading and conversion.
Code:
sed -e 's/msg=//g' -e 's/src=//g' -e 's/chl=//g' -re 's/^.+chat ://g' -e 's/ Chat:/chat/g' -e 's/ Whisper:/whisper/g' -e 's/dst=//g' -e 's/fid=//g' -e 's/ Guild:/guild/g' /server/logs/world2.chat > /opt/lampp/htdocs/gmgold/chatlogs/chatlogs2.csv
sed -i -e 's/ /,/g' /opt/lampp/htdocs/chatlogs/chatlogs2.csv
2. Website to convert logs, you will need to truncate the log files every couple of days or it gets MASSIVE!
You must be registered to see links
SQL structure
Code:
-- phpMyAdmin SQL Dump
-- version 3.1.3.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 08, 2010 at 02:01 AM
-- Server version: 5.1.33
-- PHP Version: 5.2.9
SET FOREIGN_KEY_CHECKS=0;
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT=0;
START TRANSACTION;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `chatlogs`
--
-- --------------------------------------------------------
--
-- Table structure for table `importedlogs`
--
-- Creation: Nov 19, 2009 at 12:25 PM
-- Last update: Dec 05, 2009 at 02:50 PM
--
DROP TABLE IF EXISTS `importedlogs`;
CREATE TABLE IF NOT EXISTS `importedlogs` (
`type` text NOT NULL,
`source` int(11) NOT NULL,
`dest` int(11) NOT NULL,
`chat` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=gbk;
-- --------------------------------------------------------
--
-- Table structure for table `translatedchat`
--
-- Creation: Nov 19, 2009 at 12:25 PM
-- Last update: Nov 19, 2009 at 12:25 PM
--
DROP TABLE IF EXISTS `translatedchat`;
CREATE TABLE IF NOT EXISTS `translatedchat` (
`type` text CHARACTER SET utf8 NOT NULL,
`source` int(11) NOT NULL,
`dest` int(11) NOT NULL,
`chat` text CHARACTER SET gb2312 NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=gbk;
SET FOREIGN_KEY_CHECKS=1;
COMMIT;
Last edited: