Skip to content

Commit

Permalink
print following messages over party chat
Browse files Browse the repository at this point in the history
  • Loading branch information
ferronn-dev committed Jun 20, 2022
1 parent 97b77ab commit 0d40830
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
13 changes: 11 additions & 2 deletions ace.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
local addonName = ...
local addonName, G = ...

local ace = LibStub('AceAddon-3.0'):NewAddon(addonName, 'AceComm-3.0', 'AceConsole-3.0', 'AceSerializer-3.0')

local ace = LibStub('AceAddon-3.0'):NewAddon(addonName, 'AceConsole-3.0')
LibStub('AceConfig-3.0'):RegisterOptionsTable(addonName, {
type = 'group',
args = {
Expand Down Expand Up @@ -33,3 +34,11 @@ local handleCommand = LibStub('AceConfigCmd-3.0').HandleCommand
ace:RegisterChatCommand(slash, function(input)
handleCommand(ace, slash, addonName, input)
end)

ace:RegisterComm(addonName, function(_, value, _, sender)
print(('%s is following %s.'):format(sender, value))
end)

G.DataWatch('following', function(value)
ace:SendCommMessage(addonName, tostring(value), 'PARTY')
end)
7 changes: 7 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ addon: Ferronnizer
deps:
ace.lua:
- libs/AceAddon-3.0/AceAddon-3.0.lua
- libs/AceComm-3.0/AceComm-3.0.lua
- libs/AceConsole-3.0/AceConsole-3.0.lua
- libs/AceConfig-3.0/AceConfig-3.0.lua
- libs/AceSerializer-3.0/AceSerializer-3.0.lua
- ui.lua
actions.lua:
- bandagedb.lua
Expand All @@ -29,6 +31,9 @@ deps:
- util.lua
equip.lua:
- datawatch.lua
libs/AceComm-3.0/AceComm-3.0.lua:
- libs/AceComm-3.0/ChatThrottleLib.lua
- libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
libs/AceConfig-3.0/AceConfig-3.0.lua:
- libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
- libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
Expand Down Expand Up @@ -106,8 +111,10 @@ deps:
- util.lua
libs:
AceAddon-3.0: https://repos.wowace.com/wow/ace3/trunk/AceAddon-3.0
AceComm-3.0: https://repos.wowace.com/wow/ace3/trunk/AceComm-3.0
AceConfig-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConfig-3.0
AceConsole-3.0: https://repos.wowace.com/wow/ace3/trunk/AceConsole-3.0
AceSerializer-3.0: https://repos.wowace.com/wow/ace3/trunk/AceSerializer-3.0
CallbackHandler-1.0: https://repos.wowace.com/wow/callbackhandler/trunk/CallbackHandler-1.0
LibStub: https://repos.wowace.com/wow/libstub/trunk
roots:
Expand Down

0 comments on commit 0d40830

Please sign in to comment.