diff options
Diffstat (limited to 'data')
| -rw-r--r-- | data/modules.example.conf | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/data/modules.example.conf b/data/modules.example.conf index d4d86c0ba..2742ef3b0 100644 --- a/data/modules.example.conf +++ b/data/modules.example.conf @@ -340,6 +340,43 @@ proxyscan } /* + * m_sql_authentication + * + * This module allows authenticating users against an external SQL database using a custom + * query. + */ +#module { name = "m_sql_authentication" } +m_sql_authentication +{ + /* SQL engine to use. Should be configured elsewhere with m_mysql, m_sqlite, etc. */ + engine = "mysql/main" + + /* Query to execute to authenticate. A non empty result from this query is considered a success, + * and the user will be authenticated. + * + * @a@ is replaced with the user's account name + * @p@ is replaced with the user's password + * @n@ is replaced with the user's nickname + * @i@ is replaced with the user's IP + * + * Furthermore, if a field named email is returned from this query the user's email is + * set to its value. + */ + query = "SELECT `email_addr` AS `email` FROM `my_users` WHERE `username` = @u@ AND `password` = MD5(CONCAT('salt', @p@))" + + /* + * Enable to have this module disable /nickserv register. + */ + disable_ns_register = false + + /* + * The reason to give the users who try to /ns register if + * disable_ns_register is enabled. + */ + #disable_reason = "To register on this network visit http://some.misconfigured.site/register" +} + +/* * m_sqlite * * This module allows other modules to use SQLite. |
