Plugin:Users MySQL

From ShoutIRC RadioBot Wiki
Revision as of 14:13, 25 October 2013 by Indy (talk | contribs) (Text replacement - "IRCBot" to "RadioBot")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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';