Fixes
Nicklist
Add missing NICK support to track nick changes in plugins/nicklist.
BREAKING CHANGES
Each message contains now source and params object.
-
sourceobject is optional and replaces the oldoriginkey. It containsnamekey (containing the user nick or the server host). It may also contain an optionalmaskobject, containingusername andhostname (only if thesourcerefers to a user). -
paramsobject contains all the existing previous message keys, except thesourceobject.
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.