Hanna Bot

Interact with Hanna IRC Bot via its REST API

Overview

The "Hanna Bot" node allows interaction with an IRC bot named Hanna via its REST API. It supports a variety of IRC-related operations such as sending messages or notices, joining or leaving channels, changing nicknames, retrieving user or channel information, and fetching bot status or statistics.

Specifically, the Get Specific User operation fetches detailed information about a particular IRC user by their username. This can be useful for monitoring user activity, checking user status, or gathering metadata about users in an IRC network.

Practical example:
You want to retrieve details about a user named "john_doe" on your IRC network to check if they are currently away, what channels they belong to, and whether they have operator privileges.

Properties

Name Meaning
Username IRC username to get detailed information about (required).

Output

The output JSON object for the Get Specific User operation contains:

  • success: Boolean indicating if the request was successful.
  • operation: The operation performed (user).
  • response: Raw response data from the Hanna Bot API about the user.
  • timestamp: ISO string timestamp of when the data was fetched.
  • queriedUser: The username that was queried.
  • userDetails: An object containing detailed user information:
    • nick: User's IRC nickname.
    • user: Username part of the user's identity.
    • host: Hostname or IP associated with the user.
    • realName: Real name of the user.
    • isAway: Boolean indicating if the user is marked as away.
    • awayMessage: Away message text if set.
    • channels: Array of channels the user is currently in.
    • server: Server the user is connected to.
    • idleTime: Time in seconds the user has been idle.
    • isOperator: Boolean indicating if the user has operator privileges.

No binary data is output by this operation.

Dependencies

  • Requires an API key credential to authenticate with the Hanna Bot REST API.
  • The node makes HTTP requests to the configured Hanna Bot API URL.
  • Proper configuration of the Hanna Bot API endpoint and credentials within n8n is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Incorrect usernames may result in empty or error responses.
    • Network connectivity problems to the Hanna Bot API endpoint will cause request failures.
  • Error messages:

    • "Invalid operation: user" — indicates the operation parameter was not correctly set to "user".
    • API errors returned from the Hanna Bot service will be included in the error message.
    • If the node fails and continueOnFail is disabled, execution stops; enabling it allows processing subsequent items.
  • Resolution tips:

    • Verify API credentials and endpoint URL.
    • Ensure the username exists on the IRC network.
    • Check network access and firewall settings.

Links and References

Discussion