Changelog

v4.10.0

  • Added CTCP CLIENTINFO, SOURCE, PING as recommend by the living IRC specification.
  • Via irc-socket, input is normalized via the unicode NFC algorithm. Thanks @ubsan for the patch and associated tests.

v4.9.0

  • Added memoizeOver to client.whois(nickname, isServer, {memoizeOver}) to prevent sending multiple whois requests in a row for the same message.

v4.8.0

  • Added client.respond to handle a response imperatively (a.k.a. without returning it).
  • Added config plugin with configDefaults static hook.
  • Added static hooks so that plugins can read data before init is called.

v4.7.0

  • Added the ability to return Responses in command middleware, not just undefined.

v4.6.1

  • Fixed another wrong property name in a channel plugin method.

v4.6.0

  • Added .off() for commands subscriber.
  • Added commandMiddleware to commands plugin.

v4.5.0

  • Added reason property to kick messages.
  • Fixed various wrong method name errors in the channel plugin causing less spurious error messages.
  • Fixed kicker property of kick messages giving the reason instead.
  • Removed the add and remove functions on the channel plugin exports. Given the error messages mentioned prior, I don't think anybody was relying on the channel plugin at all yet.
  • Removed the chatHistory property on Channel objects. No code was updating it.
  • Tests: Started writing some tests for the channel plugin.

v4.4.0

  • Added: command-ignore-list entries can be an array of strings where the first string is the command to ignore and the rest is the plugins to ignore the command from.

v4.3.4

  • Fixed issue with `null` in config files from v4.3.3.

v4.3.3

  • Fixed an issue with leaving out the capabilities field mutating the default capabilities for future calls to the Tennu constructor.
  • Added irc2 as a daemon. Disables the channel plugin and disables capabilities.
  • Disabled the channel plugin for daemon of twitch.

v4.3.0

  • Added: Channel plugin. Didn't properly test. It throws (harmless) errors.

v4.2.3

  • Bugfix: Command Trigger for Subscriber should be "!", not command-trigger config property.

I (Havvy) failed to publish correctly not once, but twice! Versions 4.2.1 and 4.2.2 are bad builds.

Because this was such a terrible bug, version v4.2.0 was unpublished.

v4.2.0

  • Added: CTCP Plugin
  • Added: CTCP VERSION handled.
  • Added: PluginSubscriber.addEmitter now takes optional third argument: acceptsMetadat; when true, emitter's on method called with third argument containing {plugin: "plugin-name"}.
  • Changed: Logging in PluginCommands now says when commands are registered and which plugin they come from.
  • Changed: Logging in PluginCommands now says which plugin+command handled the command.
  • Deprecated: Client.ctcp, PluginAction.ctcp, Response's intent of "ctcp". Use next item instead.
  • Added: ctcpRequest and ctcpRespond on Client, PluginAction, and a Response intent.
  • Fixed: Do not send IRC3 Capabilities when daemon config property is "twitch".

v4.1.4

  • Bugfix: Command Trigger for Subscriber should be "!", not command-trigger config property.

This fix was backported from v4.2.3

Because this was such a terrible bug, version v.4.1.2 was unpublished.

v4.1.3

Bad build.

v4.1.2

  • Bugfix: Fix index.js

Because this was such a terrible bug, versions v.4.1.0 and v4.1.1 was unpublished.

v4.1.1

  • Changed: Commands plugin logging levels raised from debug to notice.
  • Fixed: badResponseFormat is not defined in PluginMessages.
  • v4.1.0

    • Added: Dependencies can now be the objects directly, not just functions.
    • Added: 'action:' prefix for subscribing to Action plugin's emitter.

    Upgrade Notes

    If you are creating a function to hold a statically created Logger or something, you no longer need to do that.

    v4.0.3

    • Bugfix: Command Trigger for Subscriber should be "!", not command-trigger config property.

    This fix was backported from v4.2.3

    Because this was such a terrible bug, version v.4.0.1 was unpublished.

    v4.0.2

    Bad build.

    v4.0.1

    • Bugfix: Fix index.js

    This fix was backported from v4.1.2

    Because this was such a terrible bug, all previous versions in v.4.0.0 was unpublished.

    v4.0.0

    • Changed: BiSubscriber module removed, replaced with PrefixEventSubscriber and placed into the built-in plugin subscriber.
    • Refactor: MessageHandler module moved into messages plugin.
    • Refactor: CommandHandler module moved into commands plugin.
    • Removed: Various unused files in the lib directory.
    • Changed: [Breaking] Only one handler is allowed per command.
    • Changed: Removed after-events handling for commands in favor of dispatching to messages plugin. Visible in logging because it'll say PluginMessages instead of PluginCommands in the logger output.
    • Internal: Replaced lodash with individual lodash function modules.
    • Removed: client.events property. Use the on, once, and off methods on the client instead. Or the handlers hook if inside a plugin.
    • Added: Replyname for numeric 001 (RPL_WELCOME) message.
    • Added: PluginCommands.isCommand(Message).
    • Added: PluginMessages.afterEmit(function).
    • Bugfix: Allow command-trigger: "" to work.
    • Deprecate: Config property disable-help. Use command-ignore-list: ["commands", "help"] instead.

    Upgrade Notes

    I don't think anybody is using client.events, but that should be easily fixable, and keeping it around doesn't actually confer any benefits. Either use the methods on the client directory or call client.getPlugin("subscriber") and call the methods on that.

    If for some reason you have two or more command handlers for the same command, add one of them to the ignore list, or create a plugin that provides a hook for the command.

    disable-help is deprecated in favor of specifically ignoring the commands. Letting the entire plugin be disabled would mean that you would have to be careful with any plugins that depend on it.

    v3.0.0

    • Changed: [Breaking] irc-socket dependency upgraded to at least v.3.0.5.
    • Added: after-events dependency upgraded to at least v.1.0.1.
    • Added: NicknameTracker module moved into self plugin.
    • Added: Request and require IRCv3 multi-prefix capability.
    • Added: tennu.Client() throws an error if the Logger is missing a method.
    • Removed: Client.prototype.getModule removed. Use Client.prototype.getPlugin instead.
    • Tests: Moved mock-net-socket to @havvy/mock-net-socket.

    Update Notes

    See Updating to v3.0.0 for how to update. The majority of the update is just updating configuration values.

    For this release, we require the the networks you connect with to have those IRCv3 capabilities. This will be relaxed in the future, but the channel plugin will be sort of dependent upon it. Once the channel plugin is in, we'll find a way to make parts of it work without those capabilities, or at minimum, have a version that doesn't tell you the op/voice/etc. modes of the users so it works on Twitch.

    v2.3.0

    • Bugfix: Client.mode with mode parameters actually works.
    • Added: Modelist Message Extensions (Thanks Dan_Ugore)
    • v2.2.0

      • Package: Require r-result.
      • Bugfix: Cast timestamp to Number in RPL_TOPICWHOTIME
      • Added: Breaking: Make .join("#channel") return a Promise<Result<JoinInfo, FailMessage>, Error>
      • Added: Change JoinInfo to be better designed.
      • Bugfix: Quit showing errors on successful joins.
      • Tests: Test Join succeeds case, Timeout case.
      • Added: Client.whois(user) returns a Promise<Result<WhoisInfo, FailMessage>, Error>
      • Refactor: User plugin's isIdentifiedas(nickname) function now uses Client.whois's promise.
      • Added: Message extensions for 421 (ERR_UNKNOWNCOMMAND)
      • Added: Add message.channels to RPL_WHOISCHANNELS
      • Added: Added more whois response message extensions.
      • Bugfix: Unsubscribe from timeouts when unsubscribing handlers in .join(), .whois().
      • Bugfix: Normalize channel properties in new message handlers to lowercase as specified in docs.

      Upgrade Notes

      As far as I, Havvy, know, nobody was depending on the fact that client.join("#chan") returned a promise, and when I took a second look at the code, it was just hard to use. It was also incorrect in a few places. I've added tests to make sure that it is correct, and also changed it to return the JavaScript equivalent to Rust's result. In any case, I'm currently happy with the interface now, so feel free to use it.

      For now, when using client.whois(nickname), you will only get a promise if you whois a single nickname.

      v2.1.1

      npm for some reason didn't actually upload the changes in v.2.1.0, just gave a copy of v2.0.3. So version 2.1.0 was unpublished and v2.1.1 published because republishing is not allowed in npm.

      v2.1.0 - The Action Plugin Update

      • Internal: Add lambda-match to plugins macros.
      • Added: "help-helpfile" config option for replacing !help nullary-arg helpfile
      • Refactor: Single quoted strings to double quoted in various files.
      • Added: Rewrite Client.join to return a more useful promise.
      • Added: Message extensions for the following message types.

        • ERR_UNAVAILRESOURCE
        • ERR_NEEDMOREPARAMS
        • ERR_CHANNELISFULL
        • ERR_INVITEONLYCHAN
        • ERR_BANNEDFROMCHAN
        • ERR_BADCHANNELKEY
        • ERR_NEEDREGGEDNICK
        • ERR_SECUREONLYCHAN
        • ERR_OPERONLY
      • Added: Add Client.kick(channel, nickname)
      • Bugfix: Client.log should pass level to logger, not to client.
      • Added: Action.raw should log source and arguments separately.
      • Bugfix: Client.notice(target, [message]) was not implemented.
      • Refactor: Move OutputSocket functionality to Action plugin.
      • Bugfix: Make Client.getPlugin & related return their return value, and not the Client.
      • Bugfix: BiSubscriber.off("!x") did not actually work.
      • Added: BiSubscriber methods are now case-insensitive.
      • Removal: Removed Client.out. Not gonna make this v.3.0.0 because nobody was using it.

      Upgrade Notes

      The only backwards incompatible change is the removal of the ability to pass your own OutputSocket to Tennu (not to be confused with the NetSocket or IrcSocket). I haven't seen anybody actually use that behavior though. It was replaced with the Action plugin.

      Thanks to TsundereVanila for suggesting the "help-helpfile" config option.

      Thanks to Dan Ugore for pointing out quite a few bugs. Part of the reason I'm publishing so quickly.

      v2.0.3

      • Bugfix: Add 'chunk' to deps.
      • Bugfix: Command Handler needs same responsing handling as Message Handler.
      • Bugfix: 'Message Handler' -> 'MessageHandler' in logging.

      v2.0.2

      • Unpublished.

      v2.0.1

      • Bugfix: Do not throw error calling Logger.note instead of Logger.notice in Client.quit
      • Bugfix: Readded removed space in string from incorrect refactoring in untested method Client.userhost.

      v2.0.0

      • Add message extensions for MODE. They're not 'correct', based on hard-coding of Unrealircd behavior, but they're better than nothing. Thanks Dan Ugore.
      • Breaking: Replace the deprecated Client.notice() with one that sends a notice on IRC. This is the cause for the major version bump.
      • Added Client.who(channel) to the OutputSocket.
      • Added support for showing your command handler in helpfiles. Use "\{\{!\}\}" in your help files.
      • Added Response intents of "ctcp", "notice", and "none".
      • Internal: Move the binary into /src, and then move to /bin so there is one canonical location for source.
      • Internal: Started using natefaubion's lambda-chop macros.

      Upgrade Notes

      The backwards incompatible change was that Client.notice() was changed from delegating to Logger.notice to delegating to OutputSocket.notice. To use Logger.notice, use Client.note instead.

      v1.0.1

      • Peg the default realname value to the version in `package.json`.

      v1.0.0 - The SemVer update

      Just a version bump to start using SemVer for real. Tennu still isn't feature complete, but it's usable.

      v0.9.7

      • Fixed a typo in the "channel" property of the "323" message.
      • Updated minimum irc-socket dependency to v.2.3.0 which has some timeout handling.

      v0.9.6

      • Fixed bug in previous version.
      • Fixed join on success test to use promises

      v0.9.5

      • Fix failing tests due to non-SemVer-compliant breakages in Sinon's Fake Time capabilities.
      • Finally replace all uses of Q.js with Bluebird.
      • Bug: Failed to change an instance of deferred.resolve() to resolve(), causing an internal error to be thrown.

      v0.9.4

      • Republish of v0.9.3 since it was unpublished.

      v0.9.3

      • Changed build system, replacing Fez with Gulp, since Fez's maintainer vanished.
      • Moved all source files into subdirectories in /src.

      v0.9.2

      • Bugfix: Crash in MessageHandler.

      v0.9.1 - Startup plugin + bugfixes (In progress)

      • Startup code in Client factory moved to startup plugin.
      • Client.notice() is deprecated. Use Client.note(). This will allow .notice() to be /notice command. No changes to the Logger are made. Logger.notice() is still the name of the logger notice method.
      • Bugfix: Use either .removeListener() or .off() for primary event in BiSubscriber instead of just .removeListener().
      • Bugfix: Fix listeners in User.isIdentifiedAs().

      Upgrade Notes

      Where you are using Client.notice(), change it to Client.note().

      v0.9.0 - The plugin update

      • Updated tennu-modules v2.x.x to tennu-plugins v3.0.x.
      • Moved lib/event-emitter.js to its own package, after-events.
      • Made changes to configuration properties.

        • nick1 -> nickname
        • user1 -> username
        • modules -> plugins
        • trigger -> command-trigger
        • password2 -> auth-password
        1. Actually, these properties will now just throw an error when used. The replacements were added in v.0.8.4.
        2. password still works for the server password, only the nickserv password changed.
      • Removed receiver property from Message objects.
      • Readded isupport support in server plugin.
      • Passed isupport object to Message factory. Unused by factory in this release.
      • Plugins and client.js are using sweet.js, and must now be built when changed.

      Upgrade Notes

      You'll definitely want to update your configuration files and/or objects for the property changes.

      If you're using a tennu_modules directory, rename the directory to tennu_plugins.

      Anywhere in your code and documentation that you are using 'module', change it to 'plugin'.

      Historical Notes

      The change from calling them modules to plugins is because it was getting confusing to refer to a Node module and a Tennu module, and they really needed to be called something different. Looking at Tennu today, they should really be called components, but it's not worth breaking the ecosystem to rename them again.

      v0.8.4

      • Update irc-socket to v.2.2.x.
      • Configuration additions from the update:

        • nickname - Alias for nick.
        • username - Alias for user.
        • ipv6
        • localAddress
      • (Thanks metalbot) Nick highlight command trigger case is now case-insensitive.
      • BiSubscriber and Client gain .off() method which take the same properties as .on(), but removes the listeners. There is no way to remove listeners added by .once() though. File an issue if you need this.

      v0.8.3

      v0.8.2

      v0.8.1

      • Fixed client.ctcp() and client.act().
      • Renamed client.initialize() to client.initializeModule().
      • Renamed client.isInisInitializable to client.isModuleInitializable().

      v0.8.0 - The promised update

      • Beginning promise support by allowing response object to be a promise for its respective type.
      • Moved nickname tracking code to its own module.
      • Updated to tennu-modules v.2.0.x.

        Modules are now objects with the following properties:

        • init
        • requires
        • requiresRoles
        • role
        • name

      v0.7.2 - The whois update

      • Message extensions for the following numerics:

        307
        RPL_WHOISREGNICK
        311
        RPL_WHOISUSER
        312
        RPL_WHOISSERVER
        317
        RPL_WHOISIDLE
        318
        RPL_ENDOFWHOIS
        319
        RPL_WHOISCHANNELS
        330
        RPL_WHOISLOGGEDIN
        378
        RPL_WHOISHOST
        401
        ERR_NOSUCHNICK
      • Numerics with extensions will have the MessageHandler emit the replyname.
      • User plugin exports isIdentifedAs(nickname, nickname_identified, callback).
      • Added mocha, sinon, deep-eql, and better-assert to devDependencies.
      • Added /test directory for Mocha tests.

      v0.7.1

      • Command Line tool improvements:

        • -d flag for logging debug. Must be paired with -v.
        • Errors log their stacktrace.
      • OutputSocket#rawf(format, args...)
      • MessageHandler and CommandHandler log to "error" the stack of the error.
      • Bugfix: CommandHandler listener to MessageHandler no longer returns.
      • Bugfix: Pass socket and logger to MessageHandler in correct order!

      v0.7.0 - Logging and Command Line Interface

      • Logging Interface:

        • Levels (also methods): debug, info, notice, warn, error, crit, alert, emerg
        • .log(level, ...log_message);
        • Logs to nothing by default, so you'll have to pass in a Logger.
      • Deprecation: .nick() nullary version deprecated. Use .nickname() instead.
      • KICK message extension added (channel, kicked, kicker)
      • .then() changed to .after() in ./lib/event-emitter to avoid `thennable assimilation` in ES6.
      • Command Line Tool added. (Use via ./node_modules/tennu/bin/cli.js config.json -v)

      There are two critical bugs in this release. They are fixed in v.0.7.1.

      v.0.6.1

      • Bugfix: Commands won't echo the raw message back to the originating channel.
      • Bugfix: Unfreeze Messages parsed by MessageParser.
      • Commands return values are echoed to the originating channel (if they are strings).

      v0.6.0 - The irc-message update.

      • BACKWARDS INCOMPATIBLE! Changed property names for Message and Command to align with IRC specification and the irc-message module.
      • BACKWARDS INCOMPATIBLE! Messages with command type of "nick" have the "newNick" property changed to "new"
      • BACKWARDS INCOMPATIBLE! Removed the extension for the 353 numeric. It wasn't actually doing anything useful. It'll be readded in the future, but actually do some useful parsing. Use .params[0] to get it..
      • Help Module reimplemented. See "help.md" for more information.
      • "Respond" functionality. The return value for listeners that have a channel is said to the channel. No more doing tennu.say(message.channel, what_you_want_to_say). Just do `return what_you_want_to_say;`! In the future, we'll allow promises too.
      • Add .out and .events to Client as aliases to the OutputSocket and BiSubscriber.
      • Messages with the command type of "nick" have the property "old" added, which is an alias for the "nickname" property.
      • Commands have a [[prototype]] of the Message that they are parsed from.
      • Message have a tags property. (See: the spec and expr/irc-message)
      • Removed all default logging.
      • Use irc-message as the base Message parser.
      • Replaced mout with lodash.
      • Removed Grunt.js
      • Bugfix: Multiple spaces between words will not mess up commands and message parsing. Thanks expr for reporting.
      • Bugfix: Arbitrary events won't fire when passed incomplete messages from server (fixed in irc-socket)
      • Bug: On command, the client will echo the raw message to the channel.

      v0.5.3

      • Hotfix: this._name() doesn't exist in CommandParser

      v0.5.2

      • Require 1.0.1 of simple-irc-socket for logging.

      Historical Note

      The package irc-socket was originally called "simple-irc-socket". Since calling things "simple" in their name is a bad idea, it was quickly dropped.

      v0.5.1

      • Fixed OutputSocket.ctcp and OutputSocket.act

      v0.5.0 - The Tennu Update

      • Moved module system to its own project.
      • Module system completely revamped.
      • Module loading via name and tennu_modules directory-tree climb.
      • Modules no longer have internal 'name' property.
      • Moved IRC socket to its own project.
      • Got the project building again.
      • Renamed from NRC (Node Relay Client) to Tennu

      Historical Notes

      This project used to be called Node Relay Client. This was because Havvy was uncreative with names. During the v.0.5.0 update, the project was renamed such that it was easier to call the project by something unique. Good thing too, since Node.js has forks nowadays.

      v0.4.4

      • Made dependency injection argument of Client optional.
      • Started the ChunkedMessageParser. Not working.

      v0.4.3

      • Nrc class renamed to Client.
      • `whois` method added to IrcOutputSocket/Client
      • Moved startup stuff from IrcMessageHandler to Client.
      • Internal: Removed config parameter from IrcMessageHandler constructor. :)
      • Testing of 'say', 'part', and 'quit' of the IrcOutputSocket.

      v0.4.2 (Unreleased)

      • Renamed classes.
      • Added an IrcOutputSocket class. NRC absorbs it of course.
      • Added everything to the index.
      • Got Dependency Injection for all non-structure objects.
      • Added userhost method to IrcOutputSocket/NRC.

      v0.4.1

      • Added a new test for Message Handlers.

      Historical Notes

      Oh hah...pushing out a new release just because there are more tests.

      v0.4.0 - The Module update

      • Event listeners are no longer bound to 'nrc'.
      • Message and Command objects use 'args' instead of 'params/parameters'. This follows the same naming convention that node-irc uses.
      • Default NRC Modules are refactored so that they return a function that returns a module.
      • ModuleSubscriber.requires() interface contract changed so that it takes a one-arg constructor (that arg being the NRC object for the server the module will be on) that returns a module.
      • Module contract gains additional optional field for dependencies: + dependencies(undefined U ModuleExports): List[String] U undefined
      • Only the server module works.

      v0.3.0

      • Removal of the Protocols dependency. There's no logging at the moment.
      • Modules are moved to their own object.
      • BiSubscriber handlers the subscribing of events to either the IRCMessageEmitter or the IRCCommandEmitter.
      • Default NRC Modules are disabled (until the next version)

      v0.2.0

      • Module system added.

      v0.1.0

      • Rewrite of original nrc module.