The "sqloper" Module

Description

This module allows server operators to be authenticated against an SQL table.

Configuration

To load this module use the following <module> tag:

<module name="m_sqloper.so">

<sqloper>

The <sqloper> tag defines settings about how the sqloper module should behave. This tag can only be defined once.

Name Type Default Value Description
dbid Text None Required! The name of the database connection to execute the query against.
hash Text None The algorithm that server operator passwords are hashed with.
query Text SELECT hostname as host, type FROM ircd_opers WHERE username='$username' AND password='$password' The SQL query to retrieve the server operator with.

The query field can contain any of the following template variables:

Variable Description
$gecos The real name (gecos) of the user.
$host The real hostname of the user.
$ident The username (ident) of the user.
$ip The IP address of the user.
$nick The nickname of the user.
$password The password that the user specified in the /OPER command. Hashed with the algorithm specified in the server configuration.
$server The name of the server the user who is attempting to log into an operator account connected to.
$username The username that the user specified in the /OPER command.
$uuid The UUID of the user.

The following hashing modules are included with InspIRCd:

Algorithm Module Description
hmac-md5 md5 Hashes using the MD5 and HMAC algorithms.
hmac-ripemd160 ripemd160 Deprecated! Hashes using the RIPEMD-160 and HMAC algorithms.
hmac-sha256 sha256 Hashes using the SHA-256 and HMAC algorithms.
md5 md5 Hashes using the MD5 algorithm.
ripemd160 ripemd160 Deprecated! Hashes using the RIPEMD-160 algorithm.
sha256 sha256 Hashes using the SHA-256 algorithm.
Example Usage
<sqloper dbid="sqloper"
         hash="hmac-sha256"
         query="SELECT hostname as host, type FROM ircd_opers WHERE username='$username' AND password='$password'">

Special Notes

The following SQL modules are included with InspIRCd:

Engine Module Description
mysql mysql Queries a MySQL database.
pgsql pgsql Queries a PostgreSQL database.
sqlite3 sqlite3 Queries an SQLite database.

Schemas for the server operator database are available in the extras directory in the root of the InspIRCd source code.