2.0/Module/m sql oper

From AnopeWiki
Revision as of 20:53, 13 May 2014 by Azander (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Language
Section Database
Module m_sql_oper
Author Anope


Description

Allows granting users services operator privileges and possibly IRC Operator privileges based on an external SQL database using a custom query.

  • Enabeled/Disabeled using the ./extra command line configuration tool.
  • NOTE: Requires the m_mysql module.
name= 
Name of the module
engine= 
SQL backend method it should use to get it's data
query= 
Custom QUERY to get the information about an oper

Default Configuration

/*
 * m_sql_oper [EXTRA]
 *
 * 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"
 
        /* 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@"
}