znc2mysql
This ZNC module provides support for logging messages into a MySQL database. It is currently in its early stages, with no support to generate the required database schema and requires manual configuration of the database information.
Requirements
This module requires:
- Python 3
pymysql
packagepy-pretty
package- Additionally (and obviously) znc with modpython module enabled
Installation
Set up the database
Create a new MySQL database, and run the included schema (located in src/db.sql
) to create the required tables. In example,
mysql -u root -p yourdb < db.sql
Configure database connection settings
open znc2mysql.py
and edit the following to reflect your database settings:
self.connection = pymysql.connect(
host='localhost',
user='root',
password='root',
db='irc',
cursorclass=pymysql.cursors.DictCursor
)
Install the module
Move znc2mysql.py
to your znc modules folder (typically ~/.znc/modules
)
Load the module in znc
loadmod znc2mysql