Skip to content

WeeChat

The WeeChat namespace provides access to the in-game IRC-like terminal chat system. Create IRC servers, send messages, and read chat history.

No permission required.

Import

typescript
import { WeeChat } from "@hotbunny/hackhub-content-sdk";

Methods

WeeChat.createServer(host, password)

Register a WeeChat IRC server that the player can connect to via the terminal.

ParameterTypeDescription
hoststringServer hostname (e.g. "irc.darknet.org")
passwordstringPassword required to connect
typescript
WeeChat.createServer("irc.darknet.org", "secret123");

The player connects using: weechat irc.darknet.org secret123

WeeChat.removeServer(host, password)

Remove a registered WeeChat server.

typescript
WeeChat.removeServer("irc.darknet.org", "secret123");

WeeChat.sendMessage(message)

Send a message in a WeeChat channel. The message appears in the chat as if sent by the specified user.

ParameterTypeDescription
message.hoststringServer host
message.usernamestringSender username
message.messagestringMessage content
typescript
WeeChat.sendMessage({
    host: "irc.darknet.org",
    username: "informant",
    message: "The target IP is 45.33.32.156",
});

WeeChat.sendMessage({
    host: "irc.darknet.org",
    username: "informant",
    message: "Be careful, they have a firewall.",
});

WeeChat.getHistory(host?)

Get message history, optionally filtered by server host.

Returns: WeeChatMessage[]

typescript
const allMessages = WeeChat.getHistory();
const serverMessages = WeeChat.getHistory("irc.darknet.org");

Types

WeeChatMessage

typescript
interface WeeChatMessage {
    host: string;
    username: string;
    message: string;
}

HotBunny Interactive Entertainment Inc.