Hanna Bot

Interact with Hanna IRC Bot via its REST API

Overview

The "Get User Info (WHOIS)" operation of the Hanna Bot node allows you to retrieve detailed information about a specific IRC user by their nickname. This includes data such as the user's host, real name, server details, operator status, idle time, and the channels they are currently in along with their modes in those channels.

This operation is useful when you want to monitor or audit IRC users, gather user metadata for moderation purposes, or integrate IRC user info into other workflows. For example, you could use it to fetch user details before sending targeted messages or to log user activity and presence on IRC channels.

Properties

Name Meaning
Nickname IRC nickname to get information about.

Output

The output JSON object contains the following fields:

  • success: Boolean indicating if the request was successful.
  • operation: The string "whois".
  • response: The raw response from the Hanna Bot API parsed as an object.
  • timestamp: ISO timestamp of when the response was generated.
  • queriedNick: The nickname that was queried.
  • userInfo: An object containing detailed user information:
    • nick: The user's IRC nickname.
    • user: The username part of the user.
    • host: The host of the user.
    • realName: The real name of the user.
    • server: The server the user is connected to.
    • serverInfo: Additional server information.
    • isOperator: Boolean indicating if the user is an IRC operator.
    • idleSeconds: Number of seconds the user has been idle (nullable).
    • channels: An array of objects representing the channels the user is in, each with:
      • channel: Channel name.
      • modes: String of mode characters the user has in that channel (e.g., "@", "+").
      • isOperator: Boolean if user is operator in that channel.
      • hasVoice: Boolean if user has voice privilege.
      • isHalfOp: Boolean if user is half-operator.

This structured output enables easy access to both general user info and detailed channel membership and privileges.

Dependencies

  • Requires an API key credential to authenticate with the Hanna Bot REST API.
  • The node makes HTTP requests to the Hanna Bot API endpoint configured via credentials.
  • No additional external dependencies beyond the Hanna Bot API service.

Troubleshooting

  • Invalid Operation Error: If the operation parameter is not set to "whois", the node will throw an error. Ensure the operation is correctly selected.
  • Authentication Errors: If the API key or URL is incorrect or missing, requests will fail. Verify the Hanna Bot API credentials are properly configured.
  • User Not Found: If the specified nickname does not exist or is offline, the API may return an empty or error response. Confirm the nickname is valid and currently active.
  • Network Issues: Connectivity problems to the Hanna Bot API endpoint will cause request failures. Check network access and API availability.
  • Parsing Errors: Unexpected API responses might cause JSON parsing errors. Ensure the Hanna Bot API version matches the node expectations.

Links and References

Discussion