Tip of the day: If you still have users on plaintext port 6667, consider enabling Strict Transport Security to gently move users to SSL/TLS on port 6697.

JSON-RPC

From UnrealIRCd documentation wiki
Jump to navigation Jump to search

UnrealIRCd has a JSON-RPC API which can be used to communicate with UnrealIRCd outside of IRC, such as via the web. Currently it has more than 40 API calls, including retrieving all kinds of information about user/channels/servers/bans, modifying user and channel properties, adding server bans, etc. The JSON-RPC API is used by the UnrealIRCd admin panel.

  • If you want an admin panel that is accessible from the browser, then see UnrealIRCd admin panel
  • If you are a developer/scripter/webdev interested in communicating with UnrealIRCd through the JSON-RPC API, then see below for Configuration and check out the JSON-RPC Technical documentation for all API calls that are available
  • If you are a JSON fan, then you may also be interested in JSON logging, which is an entirely different topic.

Configuration

You need to load the required JSON-RPC modules. Simply put this in your unrealircd.conf:

include "rpc.modules.default.conf";

Then, open up a port (Listen block) and add at least one api user (Rpc-user block):

/* HTTPS on port 8600 for the JSON-RPC API */
listen {
        ip *;
        port 8600;
        options { rpc; }
}

/* API user 'adminpanel' */
rpc-user adminpanel {
        match { ip 127.*; }
        password "password";
}

Current software

The following (external) software uses UnrealIRCd's JSON-RPC API:

Technical documentation and protocol

For developers and people who want to use the JSON-RPC API to interact with UnrealIRCd, see the JSON-RPC:Technical documentation.