Skip to content

Commit

Permalink
Route all messages through ChatThrottleLib (#50)
Browse files Browse the repository at this point in the history
* Route all messages through ChatThrottleLib

This removes all internal management of internal transmission queues,
leaving Chomp as a wrapper that really just provides "smart" routing with
the worst implementation of message serialization known to mankind.

The upstream CTL library has at this point merged in all the support
required for sending logged messages. Battle.net message support is
still pending but queued up.

One thing that we still provide for now is an increase to CTL's ancient,
outdated, and totally crappy default transmission rates. Hopefully we
can just get newer happy values upstreamed at some point, but that might
be a bit of an ask in the face of all the other major changes made to
appease Blizzard's new per-prefix throttles.
  • Loading branch information
Meorawr authored May 7, 2024
1 parent 95aca21 commit 7d22e2f
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 642 deletions.
39 changes: 13 additions & 26 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ std = "lua51"
globals = {
"__chomp_internal",
"AddOn_Chomp",
"ChatThrottleLib",
"ChatThrottleLib.MSG_OVERHEAD",
"ChatThrottleLib.BURST",
"ChatThrottleLib.MAX_CPS",
}

read_globals = {
Expand All @@ -26,53 +28,39 @@ read_globals = {
"LibStub.GetLibrary",
"LibStub.NewLibrary",

-- ChatThrottleLib
"ChatThrottleLib.BNSendGameData",
"ChatThrottleLib.Enqueue",
"ChatThrottleLib.SendAddonMessage",
"ChatThrottleLib.SendAddonMessageLogged",
"ChatThrottleLib.SendChatMessage",

-- Global APIs
"Ambiguate",
"bit.band",
"bit.bor",
"BNET_CLIENT_WOW",
"BNFeaturesEnabledAndConnected",
"BNGetFriendGameAccountInfo",
"BNGetGameAccountInfo",
"BNGetNumFriendGameAccounts",
"BNGetNumFriends",
"BNSendGameData",
"BNSendWhisper",
"C_BattleNet.GetFriendGameAccountInfo",
"C_BattleNet.GetFriendNumGameAccounts",
"C_BattleNet.GetGameAccountInfoByID",
"C_ChatInfo",
"C_Club",
"C_ReportSystem.CanReportPlayer",
"C_ReportSystem.OpenReportPlayerDialog",
"C_Timer.After",
"C_Timer.NewTicker",
"CallErrorHandler",
"C_ChatInfo.IsAddonMessagePrefixRegistered",
"C_ChatInfo.RegisterAddonMessagePrefix",
"ChatFrame_AddMessageEventFilter",
"CopyValuesAsKeys",
"CreateFrame",
"CreateFromMixins",
"DoublyLinkedListMixin",
"Enum.SendAddonMessageResult",
"ERR_CHAT_PLAYER_NOT_FOUND_S",
"FULL_PLAYER_NAME",
"GetAutoCompleteRealms",
"GetNetStats",
"GetPlayerInfoByGUID",
"GetRealmName",
"GetTime",
"hooksecurefunc",
"InCombatLockdown",
"IsInGroup",
"IsInRaid",
"IsLoggedIn",
"LE_PARTY_CATEGORY_HOME",
"LE_PARTY_CATEGORY_INSTANCE",
"LE_REALM_RELATION_COALESCED",
"Mixin",
"PLAYER_REPORT_TYPE_LANGUAGE",
"PlayerLocationMixin",
"SendChatMessage",
"securecallfunction",
"strcmputf8i",
"string.join",
"string.split",
Expand All @@ -85,7 +73,6 @@ read_globals = {
"UnitName",
"UnitRealmRelationship",
"UNKNOWNOBJECT",
"wipe",
"WOW_PROJECT_ID",
"WOW_PROJECT_MAINLINE",
}
105 changes: 0 additions & 105 deletions CTLCompat.lua

This file was deleted.

1 change: 0 additions & 1 deletion Chomp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Include file="Internal.lua"/>
<Include file="Public.lua"/>
<Include file="StringManip.lua"/>
<Include file="CTLCompat.lua"/>

<Script>
local Chomp = LibStub:GetLibrary("Chomp", true)
Expand Down
Loading

0 comments on commit 7d22e2f

Please sign in to comment.