Skip to content

Parsing message tags #334

@progval

Description

@progval

Hi, I'd like to try adding support for message tags. They would have to be stored in SircMessage, and I can see four ways to do it:

  1. their own structure: typedef struct { char *key; char *value } SircMessageTag (with value NULLable if it's a tag with no value or an empty value) and SircMessage storing an array of those + a count
  2. storing an array of key + value pair, either NULL-terminated or with a count
  3. GHashTable
  4. adding an attribute to SircMessage for each tag name, populated directly by the parser; and discard unknown tags

Option 3 would probably be the most convenient, but it will be an issue if you want to add support for extensions/plugins/... in the future; as they can't use tags the parser isn't aware of.

Ditto for SircCommandBuilder.

What do you think?

(related issue: GH-75)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions