Skip to content

Releases: wow-rp-addons/Chomp

v24

04 May 19:38
16f4ee5
Compare
Choose a tag to compare

Chomp Message Library

v24 (2023-05-04)

Full Changelog Previous Releases

  • Swap to automatic changelog generation
  • Merge pull request #52 from wow-rp-addons/patch/raise-filter-aggression
    Only use character names for error filtering
  • TOC version bump
  • Version bump
  • -print
  • Only use character names for error filtering
    Chomp (and a lot of other RP-related stuff) incorrectly use the
    localized realm name in a lot of stuff relating to comms rather
    than normalized realm names.
    For realms in the latin alphabet this works fine largely as we've been
    performing rudimentary normalization, however for realms in non-latin
    alphabets this approach for normalization doesn't work.
    As changing to normalized realm names would be a wide-ranging and
    broadly painful change, the message filter for offline player messages
    will now only use the lowercased character name as the filter key.
    This should be fine as it's not likely that someone will be sending
    messages to two identically named characters on different realms at
    once.

v23

25 Jan 01:44
15fbe77
Compare
Choose a tag to compare
v23

v23

  • Resolved various errors that could occur after a loading screen transition.

v22

17 Jan 17:56
5ed4f33
Compare
Choose a tag to compare
v22

v21

  • Removed embedded libraries. Consumers must now themselves load LibStub, CallbackHandler-1.0, and ChatThrottleLib before loading Chomp.

v21

17 Jan 17:55
8969287
Compare
Choose a tag to compare
v21

v21

  • Removed embedded libraries. Consumers must now themselves load LibStub, CallbackHandler-1.0, and ChatThrottleLib before loading Chomp.

v20

28 Aug 15:57
a16af73
Compare
Choose a tag to compare
v20

Chomp Message Library

v20 (2022-08-28)

Full Changelog Previous Releases

  • Merge pull request #49 from wow-rp-addons/patch/always-use-codecv2
    Use v2 serialization codec by default
  • Use v2 serialization codec by default
    This removes the ability for us to communicate with pre-v16 versions
    of Chomp by enforcing that all serialization goes through the new
    codec version. This will, in turn, allow us to deprecate and remove
    the old v1 codec later on down the line when nothing on the network
    should be sending us v1 codec data. Unfortunately that can't be done
    now due to the nature of codec autonegotiation starting off with
    v1 and upgrading to v2 based upon received bitflags.
  • TOC bump
  • Merge pull request #44 from wow-rp-addons/patch/deduplicate-filter-errors
    Prevent emission of duplicate error events
  • Prevent emission of duplicate error events
    Chat filters are executed once per chat frame that is registered for
    a given event; if a message is sent through Chomp to an offline player
    the SYSTEM message filter can trigger the OnError callback multiple
    times if there exists multiple chat frames all registered for that
    message type.
    This changeset makes it so that the OnError callback is only executed
    once per message by deduplicating with the unique line ID.
  • Merge pull request #48 from wow-rp-addons/patch/fix-comms-throttle-retail
    Make reduced comms throughput only affect Classic
  • Version bump
  • Make reduced comms throughput only affect Classic
    We were testing a constant that's never defined, thus actually limiting
    comms bandwidth on all clients to the levels supported by Classic.

v19

26 Feb 14:01
9cab024
Compare
Choose a tag to compare
v19

Chomp Message Library

v19 (2021-08-30)

Full Changelog Previous Releases

  • Merge pull request #46 from wow-rp-addons/chore/v19-bump
    Bump version to 19
  • Bump version to 19
    Also bump the TOC for standalone installs on BCC.
  • Merge pull request #45 from wow-rp-addons/patch/fix-keyword-serialization
    Fix serialization of keyword table keys
  • Fix serialization of keyword table keys
    If a table being serialized had a string key corresponding to a keyword
    it wouldn't be quoted, so could cause deserialization errors on the
    other end.
    This adds a quick check to make sure that we treat keywords as things
    that should always be quoted.

v18

10 May 17:36
Compare
Choose a tag to compare
v18

Chomp Message Library

v18 (2021-05-10)

Full Changelog Previous Releases

  • Corrected version
  • Merge pull request #43 from wow-rp-addons/patch/linked-list-queues
    Use doubly linked lists for queues and priorities
  • Merge pull request #41 from wow-rp-addons/feature/libstub
    Use LibStub for versioning
  • Use doubly linked lists for queues and priorities
    This is mostly a performance enhancement when dealing with message
    queues for players that get fairly large.
    The existing queue system uses an array from which queues and messages
    are removed from the start which causes all remaining elements to be
    down-shuffled. In the case of large data transfers send to lots of
    people, this would stack up and could have a noticable impact on CPU
    usage.
    As the primary operation performed on our queue is either a pop-front
    or push-back and random access is never needed, it makes more sense to
    instead use a doubly linked list.
    Mercifully Blizzard already has a mixin for this that implements an
    intrusive form where the front/back/prev/next keys are all stored on
    the inserted nodes directly; so this changeset just swaps our queue
    implementation to using that behind the scenes.
  • Remove the "()" from all error strings
    Mostly for consistency with error styles elsewhere such as in Blizzard's
    newer code; the "()" for functions doesn't really add any clarity, so
    might as well clean these up while we're here.
    The error messages in the CTL compat section are unmodified
    intentionally as these should be the same as the original lib.
  • Swap usages of AddOn_Chomp to Chomp internally
    The old global should be considered deprecated in favour of LibStub
    internally at least, even if not actually dead in the public API.
  • Use LibStub for versioning
    This makes Chomp a Good Citizen (tm) and stops it from reinventing the
    wheel of library versioning for no heckin' good reason.
    Chomp now registers itself via LibStub with the major "Chomp" and the
    same incrementing (minor) version number it always has. The internal
    table is stored on our library instance as the "Internal" subkey
    instead of as the "__chomp_internal" global, though for compatibility
    with addons that might pull in older versions of the library the old
    internal global is still exported until the PLAYER_LOGIN event has
    fired.
    This change is fully backwards compatible as far as the public API is
    concerned; The AddOn_Chomp global is still defined and just points to
    the same library table registered with LibStub. For addons that have
    captured the old AddOn_Chomp as an upvalue this shouldn't cause an
    issue as there's no state on the old table that's required by the
    library, since the whole public API avoids use of "self".
    Note that the internal table is accessible after PLAYER_LOGIN has
    fired via "Internal" key of the API table; this is intentional to assist
    with debugging.
    No work has been done to make the library upgradable after PLAYER_LOGIN
    has fired; this would be a substantial task and likely can't be done
    until the older versions are no longer in circulation.
  • Don't populate Battle.net accounts before login
    There's an edge case with the new Battle.net logic where the SameRealm
    table can be queried before it exists, as it's not created until the
    PLAYER_LOGIN event has fired - so we'll just not do it until said
    event has fired and the table should exist.
  • Merge pull request #42 from wow-rp-addons/feature/is-prefix-registered
    Add IsAddonPrefixRegistered function to API
  • Add IsAddonPrefixRegistered function to API
    Useful for checking if something has been registered with Chomp or
    not, since currently RegisterAddonPrefix will error upon a second
    attempt to register a prefix.
  • Merge pull request #40 from wow-rp-addons/patch/improve-bnet-account-lookup
    Improve Battle.net game account lookups
  • Fix NormalizeRealmName pattern and returns
  • nil => false
  • Make the CanExchange logic a bit clearer
    Since the gsub looked a bit magical giving it a function name should
    make it less of a "WTF" a few months down the line. Additionally added
    a protection against an empty realm name string.
  • Improve Battle.net game account checks
    The existing logic for checking if a smart message could be sent via
    Battle.net whispers involved traversing the entire friends list each
    time a message was sent. Previous work made this work use a cache,
    but we can do better.
    This reworks the logic to instead prebuild a mapping of merged player
    names ("name-realm") to game account IDs whenever the player logs in
    or zones through a login screen, or whenever a Battle.net event is
    raised. The resulting mapping only contains accounts that we'd consider
    valid for exchanging data with - so offline players, same-faction and
    realm ones, etc. aren't present.
    This should be a nice free performance boost and, from quick checks
    by loading Elly's profile doesn't break anything.
  • Quick packager fixups
    Use project version replacement in the TOC and make it build on
    tags only.
  • Merge pull request #38 from wow-rp-addons/feature/add-callback-registry
    Add Callback Registry and OnMessageReceived callbacks
  • Add generic callback registry support
    This adds a callback registry (provided by CallbackHandler) to provide
    a way to implement a few features that have been desirable for a small
    while now.
    The callback API exposed by the library is a sane combination of the
    one offered by Blizzards' CallbackRegistryMixin and CallbackHandler:
    • AddOn_Chomp.RegisterCallback(event, func, owner)
    • AddOn_Chomp.UnregisterCallback(event, owner)
    • AddOn_Chomp.UnregisterAllCallbacks(owner)
      RegisterCallback will register the callback (func) for the named event
      and bind it to the given owner. The owner can be a string, table, or
      thread and is synonymous with the "self" used by CallbackHandler.
      The callback will be dispatched with the owner as the first parameter,
      followed by all arguments supplied with the event. The event name isn't
      passed.
      UnregisterCallback and UnregisterAllCallbacks act the same as their
      counterparts in CallbackHandler, unregistering either the single
      handler associated with an event for a given owner, or all events for
      a given owner.
      With this in place, the events that have been defined are as follows:
    • OnError
    • OnMessageReceived
      The OnError event replaces the existing ErrorCallback mechanism and
      acts as it does today. The existing error callback related APIs
      internally register to this event now, so backward compatibility
      is maintained.
      The OnMessageReceived event is dispatched each time any callback for
      a registered prefix would be executed, with the same arguments supplied
      to the prefix callback. This solves a longstanding annoyance of not
      being able to generically register multiple callbacks for a single
      prefix, which was resolved in another branch but not merged in due to
      other concerns.
      Future callbacks might involve an OnMessageSent or notifications for
      comms load, but we'll cross those bridges when we get there.
  • Merge pull request #39 from wow-rp-addons/unfeature/remove-apidocumentation
    Remove Ingame API Documentation
  • Merge pull request #37 from wow-rp-addons/chore/add-packager-support
    Add initial packager support
  • Remove API documentation integrations
    The ingame API documentation system is seldom actually used for anything
    outside of Blizzard and we've not been keeping this documentation up
    to date as-is, in addition to it being wrong in a few areas at this
    point as well.
    As it's not really adding any value this commit just yeets it. We can
    possibly revisit shoving it in the README at a later date, but until
    then no one is really using the library enough to justify maintaining
    the documentation, and most authors are already perfectly acquainted
    with the idea of just reading the implementation - which is always
    accurate, up-to-date, and has self-documenting errors and assertions.
  • Add initial packager support
    This implements support for the packager and uploading new zips to
    GitHub releases, as well as packaging internal dependencies which
    is going to be needed for a few upcoming changes to the library.
    This is the minimal work for the packager as a standalone reviewable
    unit.
    Of note, Chomp now embeds ChatThrottleLib so that it can ensure 100%
    of the time is loaded for its own redirection layer. I'm still hoping
    that in the future we can just kill that part and have CTL do all the
    backend comms.

v8 - 8.1.0/build 28807

12 Jan 15:10
Compare
Choose a tag to compare
  • Fixes issues with empty string errors from BNGetGameAccountInfo() in build 28807.

v7 - Lua error fixes

20 Aug 22:17
Compare
Choose a tag to compare

This fixes two Lua errors:

  • A very rare one when certain Battle.net conditions are met (poorly timed friend removal, namely).

  • A Lua error that made 'smart' messages unusable for types other than whispers.

v6 - More prepatch bugfixes

30 Jul 17:53
Compare
Choose a tag to compare
  • Queued messages (prior to PLAYER_LOGIN) should now actually work. For real.

  • Serialized messages will never return function values now, even as a key/value in a table.

  • API documentation has been updated for messageOptions and prefixSettings structures.