Deny link block

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  rule  type  }

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

The rule directive is very complex. A crule expression allows you to control the link in great detail, and it is set up like a programming expression. Four operators are supported, connected, returns true if a server matching servermask is connected, directcon, returns true if the server matching servermask is directly connected to this server, via, returns true if a server matching servermask is connected by a server matching viamask, and directop, which 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, an operator preceded with a ! checks if the operator returned false. If the entire expression evaluates to true, then the link is denied.

The type allows two different values: auto (only applies to autoconnects, /connect will still work), and 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 }