candy-chat / mod_log_chat_mysql5

Ejabberd module for logging chat messages to a MySQL DB
GNU Lesser General Public License v2.1
28 stars 16 forks source link

mod_log_chat_mysql

Developed by Jérôme Sautret jerome.sautret@process-one.net, Adapted for DB Logging by Michael Weibel michael.weibel@amiadogroup.com.

Prerequisite

In order to compile Emysql, Erlang R13 or newer will need to be installed. If you are using the 2.1.10 ejabberd installer, that comes with an old version of Erlang and you will not be able to compile Emysql.

Installation

    CREATE TABLE mod_log_chat_mysql5 (
       id INT AUTO_INCREMENT PRIMARY KEY,
       fromJid VARCHAR(255) NOT NULL, 
       toJid VARCHAR(255) NOT NULL, 
       sentDate TIMESTAMP NOT NULL, 
       body TEXT, 
       type VARCHAR(10)
    ) ENGINE=MyISAM CHARACTER SET utf8;