Difference between revisions of "2.0/Module/m sql oper"

From AnopeWiki
Jump to: navigation, search
(Created page with "{{Language|2.0/Modules/m_sql_oper}} {{Header|m_sql_oper|Database|Anope}} == <div class="moduleheader">Description</div> == Allows granting users services operator privileges...")
 
 
Line 5: Line 5:
 
== <div class="moduleheader">Description</div> ==
 
== <div class="moduleheader">Description</div> ==
 
Allows granting users services operator privileges and possibly IRC Operator privileges based on an external SQL database using a custom query.
 
Allows granting users services operator privileges and possibly IRC Operator privileges based on an external SQL database using a custom query.
 +
 +
*<span style="color: red;">Enabeled/Disabeled using the '''./extra''' command line configuration tool.</span>
  
 
*'''NOTE''': Requires the m_mysql module.
 
*'''NOTE''': Requires the m_mysql module.

Latest revision as of 21:53, 13 May 2014

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@"
}