Feature #3344
closedPlugins: Add access to Tags in relevant delegates.
0%
Description
The current .net plugin API does not expose the tags ( if any ) associated with a Message. Its certainly possible to parse RawMessage to get access to them but it'd be more natural to simply access them from the Delegate itself.
Updated by Per Amundsen almost 8 years ago
- Status changed from New to Assigned
- Target version set to 2.8
Can you give an example of what you need?
Updated by Stefan van Oudenaarden almost 8 years ago
Currently I hook into OnRawData and pass the data to a class that parses out the various elements. Tags end up in a Dictionary<string,string>. However OnRawData rightfully does not have any Return Eat options so I cannot "edit" anything there.
Right now I need to store my IrcMessage object, wait for the corrosponding OnMessage to fire and then I can finally access the Tags dict there. Ideally I'd prefer the Delegate for events that can have Tags associated with them to have an additional Paramater, probably a Dict<string,string> for the Tags sent along with it.
In this specific case I'm trying to find the twitch badges tag and insert additional information in a Message based on that information.
Updated by Per Amundsen almost 8 years ago
Oh, you can set the byte array to null or make it zero bytes and AdiIRC will ignore it, you can then fire fakeraw etc.
If that doesn't do what you need, I can add a overload for the OnMessage API.
Updated by Stefan van Oudenaarden almost 8 years ago
That helps me acomplish what I want to do. The overload would be more userfriendly but is not a great priority.
Updated by Per Amundsen over 7 years ago
- Status changed from Assigned to Resolved
- Target version changed from 2.8 to 2.9