2.0/Modules/os session

From AnopeWiki
Jump to: navigation, search
Language

English

Service OperServ
Module os_session
Author Anope

Description

Allows Services Operators to view the session list.

SESSION LIST 
lists hosts with at least threshold sessions. The threshold must be a number greater than 1. This is to prevent accidental listing of the large

number of single session hosts.

SESSION VIEW 
displays detailed information about a specific host - including the current session count and session limit. The host value may not include wildcards.

See the EXCEPTION help for more information about session limiting and how to set session limits specific to certain hosts and groups thereof.

  • NOTE: Access to this command requires the permission operserv/session to be present in your opertype.

Commands

session LIST threshold
session VIEW host

Examples

/msg OperServ SESSION LIST 2

/msg OperServ SESSION VIEW localhost

Default Configuration

/*
 * os_session
 *
 * Provides the commands operserv/exception and operserv/session.
 *
 * This module enables session limiting. Session limiting prevents users from connecting more than a certain
 * number of times from the same IP at the same time - thus preventing most types of cloning.
 * Once a host reaches it's session limit, all clients attempting to connect from that host will
 * be killed. Exceptions to the default session limit can be defined via the exception list.
 *
 * Used to manage the session limit exception list, and view currently active sessions.
 */
module
{
        name = "os_session"
 
        /*
         * Default session limit per host. Once a host reaches its session limit, all clients attempting
         * to connect from that host will be killed.
         *
         * This directive is required if os_session is loaded.
         */
        defaultsessionlimit = 3
 
        /*
         * The maximum session limit that may be set for a host in an exception.
         *
         * This directive is required if os_session is loaded.
         */
        maxsessionlimit = 100
 
        /*
         * Sets the default expiry time for session exceptions.
         *
         * This directive is required if os_session is loaded.
         */
        exceptionexpiry = 1d
 
        /*
         * The message that will be NOTICE'd to a user just before they are removed from the network because
         * their host's session limit has been exceeded. It may be used to give a slightly more descriptive
         * reason for the impending kill as opposed to simply "Session limit exceeded".
         *
         * This directive is optional, if not set, nothing will be sent.
         */
        sessionlimitexceeded = "The session limit for your IP %IP% has been exceeded."
 
        /*
         * Same as above, but should be used to provide a website address where users can find out more
         * about session limits and how to go about applying for an exception.
         *
         * Note: This directive has been intentionally commented out in an effort to remind you to change
         * the URL it contains. It is recommended that you supply an address/URL where people can get help
         * regarding session limits.
         *
         * This directive is optional, if not set, nothing will be sent.
         */
        #sessionlimitdetailsloc = "Please visit http://your.website.url/ for more information about session limits."
 
        /*
         * If set and is not 0, this directive tells Services to add an AKILL if the number of subsequent kills
         * for the same host exceeds this value, preventing the network from experiencing KILL floods.
         *
         * This directive is optional.
         */
        maxsessionkill = 15
 
        /*
         * Sets the expiry time for AKILLs set for hosts exceeding the maxsessionkill directive limit.
         *
         * This directive is optional, if not set, defaults to 30 minutes.
         */
        sessionautokillexpiry = 30m
 
        /*
         * Sets the CIDR value used to determine which IP addresses represent the same person.
         * By default this would limit 3 connections per IPv4 IP and 3 connections per IPv6 IP.
         * If you are receiving IPv6 clone attacks it may be useful to set session_ipv6_cidr to
         * 64 or 48.
         */
        session_ipv4_cidr = 32
        session_ipv6_cidr = 128
}
command { service = "OperServ"; name = "EXCEPTION"; command = "operserv/exception"; permission = "operserv/exception"; }
command { service = "OperServ"; name = "SESSION"; command = "operserv/session"; permission = "operserv/session"; }