Tip of the day: Connthrottle will limit the damage from big drone attacks. Check if the flood thresholds and exceptions are OK for your network.

Deny link block

From UnrealIRCd documentation wiki
Jump to navigation Jump to search

This block allows you to use specific rules to deny a server from linking. It's slightly complex and typically only used on networks with 3 or more servers.

Syntax

deny link {
	mask <server-name>;
	rule <crule-expression>;
	type <type-of-denial>;
}

The mask specifies a wildcard mask of the server name to apply this rule to.

The rule directive can be complex. A crule expression allows you to control the link in great detail, and it is set up like a programming expression. If the entire expression of the rule evaluates to true, then the link is denied.

Four operators are supported:

  • connected(<servermask>): returns true if a server matching servermask is connected
  • directcon(<servermask>): returns true if the server matching servermask is directly connected to this server
  • via(<viamask>,<servermask>): returns true if a server matching servermask is connected by a server matching viamask
  • directop(): returns true if the operator issuing a /connect is directly connected to this server

These operators can be combined using && (and) and || (or). Items may also be enclosed in parenthesis () to allow grouping. In addition, if any of the four operators are preceded with a ! then it means NOT.

The type allows two different values::

  • auto: only applies to autoconnects, /connect will still work
  • all: applies to all connection attempts

Example

NOTE: This example is for UnrealIRCd 5.2.1 and later

deny link {
        mask {
                *;
                !foobar.hub;
        }
        rule !connected(foobar.hub);
        type all;
}