Difference between revisions of "Plugin:Users MySQL"

From ShoutIRC RadioBot Wiki
Jump to navigation Jump to search
m (Text replacement - "IRCBot" to "RadioBot")
 
(No difference)

Latest revision as of 14:13, 25 October 2013

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

IPC Messages Supported

IB_GETUSERINFO
IB_ADD_USER
IB_DEL_USER
IB_ADD_HOSTMASK
IB_DEL_HOSTMASK
IB_DEL_HOSTMASKS
IB_CHANGE_FLAGS
IB_CHANGE_PASS

Configuration

Configuration Page

MySQL Database

RadioBot will create 2 tables, one called RadioBot_Users and RadioBot_UserHostmasks.

Developer Info

Passwords are stored using MySQL's built-in AES encryption. This is simple to use so shouldn't be a problem for any PHP developer.

Example reading a user including decrypting password: SELECT *,AES_DECRYPT(Pass, 'EncKey') AS dPass FROM RadioBot_Users WHERE Nick='somenick';

Example updating a user's password: UPDATE RadioBot_Users SET Pass=AES_ENCRYPT('new_password', 'EncKey') WHERE Nick='somenick';