JSON-RPC:Server ban

The server_ban.* JSON RPC calls can add, remove and list server bans such as KLINE, GLINE, etc.

= Structure of a server ban =

NOTE: Spamfilters are not changed through the  API but via spamfilter.*.

= API Calls =

server_ban.list
List server bans (*LINEs).

Arguments
No mandatory arguments at the moment

Example
{"jsonrpc": "2.0", "method": "server_ban.list", "params": {}, "id": 123}

server_ban.get
Retrieve all details of a single server ban (*LINE).

Arguments
Mandatory arguments (see structure of a server ban for an explanation of the fields):
 * type
 * name

Example
{"jsonrpc": "2.0", "method": "server_ban.get", "params": {"type":"kline","name":"*@127.1.2.3"}, "id": 123}

server_ban.add
Add a server ban (*LINE).

Arguments
Mandatory arguments (see structure of a server ban for an explanation of the fields):
 * type
 * name
 * reason
 * the duration, either:
 * duration_string, OR
 * expire_at

Example
TODO

server_ban.add
Delete a server ban (*LINE).

Arguments
Mandatory arguments (see structure of a server ban for an explanation of the fields):
 * type
 * name

Example
{"jsonrpc": "2.0", "method": "server_ban.add", "params": {"type":"kline","name":"*@127.1.2.3"}, "id": 123}