CTCP Plugin

This plugin is built-in.

This plugin listens to privmsg events, determining whether it's a ctcp, creating a CtcpRequest and firing off a ctcp event when it is. The event name is the CTCP tag. You can subscribe to these events using the handlers plugin hook. the prefix is "ctcp:" and the event name is case-insensitive. The return value is the message property of a Response where the intent is "ctcpResponse".

Example

var FingerCtcpPlugin = {
    name: "ctcp-finger",
    init: function (client, deps) {
        return {
            handlers: {
                "ctcp:finger": function (ctcp) {
                    return "Poke back.";
                }
            }
        };
    },

    // Technically not needed, since Tennu provides
    // these before it even tries to load your plugins.
    requires: ["subscriber", "messages", "ctcp"]
};

module.exports = FingerCtcpPlugin;