diff options
-rw-r--r-- | data/modules.example.conf | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/data/modules.example.conf b/data/modules.example.conf index 4ff3c710c..ba12e0f1d 100644 --- a/data/modules.example.conf +++ b/data/modules.example.conf @@ -364,15 +364,16 @@ m_sql_authentication * * 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` = @a@ AND `password` = MD5(CONCAT('salt', @p@))" - - /* We've also included some example queries for some popular website/forum systems. + * + * + * We've included some example queries for some popular website/forum systems. * * Drupal 6: "SELECT `mail` AS `email` FROM `users` WHERE `name` = @a@ AND `pass` = MD5(@p@) AND `status` = 1" * e107 cms: "SELECT `user_email` AS `email` FROM `e107_user` WHERE `user_loginname` = @a@ AND `user_password` = MD5(@p@)" * SMF Forum: "SELECT `email_address` AS `email` FROM `smf_members` WHERE `member_name` = @a@ AND `passwd` = SHA1(CONCAT(LOWER(@a@), @p@))" * vBulletin: "SELECT `email` AS `email` FROM `user` WHERE `username` = @a@ AND `password` = MD5(CONCAT(MD5(@p@), `salt`))" + */ + query = "SELECT `email_addr` AS `email` FROM `my_users` WHERE `username` = @a@ AND `password` = MD5(CONCAT('salt', @p@))" /* * Enable to have this module disable /nickserv register. @@ -387,6 +388,31 @@ m_sql_authentication } /* + * m_sql_oper + * + * This module allows granting users services operator privileges and possibly IRC operator + * privileges based on an external SQL database using a custom query. + */ +#module { name = "m_sql_oper" } +m_sql_oper +{ + /* SQL engine to use. Should be configured elsewhere with m_mysql, m_sqlite, etc. */ + engine = "mysql/main" + + /* Query to execute to determine if a user should have operator privileges. + * A field named opertype must be returned in order to link the user to their oper type. + * The oper types must be configured earlier in services.conf. + * + * If a field named modes is returned from this query then those modes are set on the user. + * Without this, only a simple +o is sent. + * + * @a@ is replaced with the user's account name + * @i@ is replaced with the user's IP + */ + query = "SELECT `opertype` FROM `my_users` WHERE `user_name` = @a@" +} + +/* * m_sqlite * * This module allows other modules to use SQLite. |