Tip of the day: The antirandom module can be a useful tool to block clients with random looking nicks.

JSON-RPC:Message

From UnrealIRCd documentation wiki
Jump to navigation Jump to search

The message.* JSON RPC calls allow you to send a messages to users.

API Calls

message.send_privmsg

This sends a PRIVMSG to a user.

Request arguments

Mandatory:

  • nick: User to send the message to (Nick or UID)
  • message: The message to send

Response

Returns true if the message was sent, or an error otherwise.

message.send_notice

This sends a NOTICE to a user.

Request arguments

Mandatory:

  • nick: User to send the notice to (Nick or UID)
  • message: The message to send

Response

Returns true if the message was sent, or an error otherwise.

message.send_numeric

This sends an IRC numeric to a user.

Request arguments

Mandatory:

  • nick: User to send the message to (Nick or UID)
  • numeric: Numeric to send (1-999)
  • message: The message to send: all the text after the :server XXX nick

Response

Returns true if the message was sent, or an error otherwise.

message.send_standard_reply

This sends an IRC standard reply to a user

Request arguments

Mandatory:

  • nick: User to send the message to (Nick or UID)
  • type: Type: FAIL, WARN or NOTE
  • code: Machine-readable reply code representing the meaning of the message to client software
  • context: Context (optional)
  • description: Description of the reply which is shown to users.

Response

Returns true if the message was sent, or an error otherwise.