Plugin:Users MySQL

From IRCBotWiki

Jump to: navigation, search

The MySQL Users plugin was created so user information (username, password, user level) can be stored in a MySQL database.

Triggers (Private Message)

!mysql-reload
 Reloads the configuration & reconnects to MySQL

IPC Messages Supported

IB_REHASH
IB_GETUSERINFO
IB_ADD_USER

Configuration

Users_MySQL {
 Server			mysql_server_hostname
 Port			3306
 DB			db_name
 User			mysql_user
 Pass			mysql_password
};

MySQL Database

You will need to create a table called IRCBot_Users. You can use this SQL statement to create it:
CREATE TABLE `IRCBot_Users` (
 `ID` INT NOT NULL AUTO_INCREMENT ,
 `Nick` VARCHAR( 255 ) NOT NULL ,
 `Pass` VARCHAR( 255 ) NOT NULL ,
 `Level` TINYINT DEFAULT '5' NOT NULL ,
 PRIMARY KEY ( `ID` )
) TYPE = MYISAM ;
Personal tools