Skip to content

v0.7.0

Compare
Choose a tag to compare
@jeromeludmann jeromeludmann released this 30 Jan 16:44
· 109 commits to main since this release

Fixes

Nicklist

Add missing NICK support to track nick changes in plugins/nicklist.

BREAKING CHANGES

Each message contains now source and params object.

  • source object is optional and replaces the old origin key. It contains name key (containing the user nick or the server host). It may also contain an optional mask object, containing user name and host name (only if the source refers to a user).

  • params object contains all the existing previous message keys, except the source object.

Example with privmsg event:

client.on("privmsg", (msg) => {
  const { source, params } = msg;

  if (!source) {
    return;
  }

  if (source.name === "nick") {
    client.privmsg(params.target, `Hello ${source.name}!`);
  }
});

Internal

Plugin Dependencies

Plugins resolve their dependencies first before to load themselves.

It allows to prevent a plugin which depends on another plugins to be loaded before them. It also improves plugin internal API by providing plugin factory from core/plugins.ts.

Potential circular dependencies will be prevented thanks to type checking.

Testing

Plugin unit tests use the full featured client constructor in order to have a more representative context of testing.