JSON-RPC:Name ban

The name_ban.* JSON RPC calls can add, remove and list banned nicks and channels (q-lines).

= Structure of a name ban = The following object is used in both request and responses.

NOTE: Only name bans are handled through name_ban.*.

= API Calls =

name_ban.list
List name bans (qlines).

Request arguments
No mandatory arguments

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

name_ban.get
Retrieve all details of a single name ban (qline).

Request arguments
Mandatory arguments:
 * name: name of the ban, eg

Example
{"jsonrpc": "2.0", "method": "name_ban.get", "params": {"name":"*C*h*a*n*s*e*r*v*"}, "id": 123}

name_ban.add
Add a name ban (qline).

Request arguments
Mandatory arguments (see structure of a name ban for an explanation of the fields):
 * name: banned name
 * reason: reason for the ban

Optional arguments:
 * set_by: who set the entry
 * the duration (without this, it is a permanent name ban which is very common), either:
 * expire_at, OR
 * duration_string

Example request
{"jsonrpc": "2.0", "method": "name_ban.add", "params": {"name":"*blah*","reason":"testing the API"}, "id": 123}

name_ban.del
Delete a name ban (*LINE).

Request arguments
Mandatory arguments: Optional arguments:
 * name: banned name
 * set_by: who unset the entry

Example
{"jsonrpc": "2.0", "method": "name_ban.del", "params": {"name":"*blah*"}, "id": 123}