Tip of the day: Don't like snomasks / server notices? Then configure logging to a channel.

JSON-RPC:Connthrottle

From UnrealIRCd documentation wiki
Jump to navigation Jump to search

The connthrottle.* JSON RPC calls allow you to control the Connthrottle module. Such as seeing the status and enabling/disabling the protection.

API Calls

connthrottle.status

Get Connthrottle status.

Request arguments

None

Response

Returns connthrottle settings.

Example:

{
  "jsonrpc": "2.0",
  "method": "connthrottle.status",
  "id": 1,
  "result": {
    "enabled": true,
    "throttling_this_minute": false,
    "throttling_previous_minute": false,
    "state": "active",
    "start_delay_remaining": 0,
    "reputation_gathering": false,
    "counters": {
      "local_count": 0,
      "global_count": 0
    },
    "stats_last_minute": {
      "rejected_clients": 0,
      "allowed_except": 0,
      "allowed_unknown_users": 0
    },
    "config": {
      "local_throttle_count": 20,
      "local_throttle_period": 60,
      "global_throttle_count": 30,
      "global_throttle_period": 60,
      "start_delay": 180,
      "except_reputation_score": 24,
      "except_sasl_bypass": true,
      "except_webirc_bypass": false
    }
  }
}

connthrottle.set

Set Connthrottle protection.

Request arguments

Mandatory:

  • action: on or off

Response

{
  "jsonrpc": "2.0",
  "method": "connthrottle.set",
  "id": 1,
  "result": {
    "success": true,
    "action": "on",
    "message": "Connection throttling enabled"
  }
}

connthrottle.reset

Reset Connthrottle counters and timers.

Request arguments

Mandatory: None

Response

{
  "jsonrpc": "2.0",
  "method": "connthrottle.reset",
  "id": 1,
  "result": {
    "success": true
  }
}