Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove broadcast 'upgrade' support #58

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ read_globals = {
"GetTime",
"hooksecurefunc",
"IsLoggedIn",
"LE_PARTY_CATEGORY_HOME",
"LE_REALM_RELATION_COALESCED",
"securecallfunction",
"strcmputf8i",
"string.join",
Expand All @@ -68,10 +66,7 @@ read_globals = {
"UnitFactionGroup",
"UnitFullName",
"UnitInParty",
"UnitInRaid",
"UnitInSubgroup",
"UnitName",
"UnitRealmRelationship",
"UNKNOWNOBJECT",
"WOW_PROJECT_ID",
"WOW_PROJECT_MAINLINE",
Expand Down
2 changes: 1 addition & 1 deletion Internal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
]]

local VERSION = 26
local VERSION = 27

if IsLoggedIn() then
error(("Chomp Message Library (embedded: %s) cannot be loaded after login."):format((...)))
Expand Down
10 changes: 0 additions & 10 deletions Public.lua
Original file line number Diff line number Diff line change
Expand Up @@ -337,16 +337,6 @@ function Chomp.SmartAddonMessage(prefix, data, kind, target, messageOptions)
ToBattleNet(bitField, prefix, Internal.EncodeQuotedPrintable(data, false), kind, bnetIDGameAccount, messageOptions.priority, messageOptions.queue)
return "BATTLENET"
end
local targetUnit = Ambiguate(target, "none")
-- Swap the commented line for the one following it to force testing of
-- broadcast whispers.
--if prefixData.broadcastPrefix and messageOptions.allowBroadcast and UnitInParty(targetUnit) then
if prefixData.broadcastPrefix and messageOptions.allowBroadcast and UnitRealmRelationship(targetUnit) == LE_REALM_RELATION_COALESCED then
bitField = bit.bor(bitField, Internal.BITS.BROADCAST)
kind = UnitInRaid(targetUnit, LE_PARTY_CATEGORY_HOME) and not UnitInSubgroup(targetUnit, LE_PARTY_CATEGORY_HOME) and "RAID" or UnitInParty(targetUnit, LE_PARTY_CATEGORY_HOME) and "PARTY" or "INSTANCE_CHAT"
data = ("%s\127%s"):format(not messageOptions.universalBroadcast and Chomp.NameMergedRealm(target) or "", data)
target = nil
end
end
if not messageOptions.binaryBlob then
ToInGameLogged(bitField, prefix, Internal.EncodeQuotedPrintable(data, true), kind, target, messageOptions.priority, messageOptions.queue)
Expand Down
Loading