The "hostchange" Module (v3)

Description

This module allows the server administrator to define custom rules for applying hostnames to users.

Configuration

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

<module name="hostchange">

<hostchange>

The <hostchange> tag defines an hostname setting rule. This tag can be defined as many times as required.

Name Type Default Value Description
action Text None Required! The action to take when a user matches this rule.
mask Text None Required! A glob pattern or CIDR range that a user must be connecting from to match against this rule.
class Text None If set then the name of the connect class that a user must be in to match against this rule.
ports No. Range None If set then a numeric range of ports that a user must be connecting from to match against this rule.
prefix Text None If set then the value to prefix hostnames with in hostchange rules that use the addnick or addaccount actions
suffix Text None If set then the value to suffix hostnames with in hostchange rules that use the addnick or addaccount actions.
value Text None Required for the set action! The hostname to set on this user.

The action field should be set to one of the following values:

Value Description
addaccount Set the user's hostname to the concatenated value of the host prefix, their account name, and the host suffix.
addnick Set the user's hostname to the concatenated value of the host prefix, their nickname, and the host suffix.
set Set the hostname of matching users to the value specified in the value field.
Example Usage

Sets the hostname of all connecting users to "ExampleNet/Users/<account>":

<hostchange action="addaccount"
            prefix="ExampleNet/Users/"
            mask="*">

Sets the hostname of all users who connected on port 6697 to "<nick>.secureusers.example.com":

<hostchange action="addnick"
            mask="*"
            ports="6697"
            suffix=".secureusers.example.com">

Sets the hostname of users connecting from *.servers.example.com to "webchat.example.com":

<hostchange action="set"
            mask="*.servers.example.com"
            value="webchat.example.com">