diff --git a/lib/modules/Protocols.pmod/IMAP.pmod/types.pmod b/lib/modules/Protocols.pmod/IMAP.pmod/types.pmod index 30dd60e261d24747f174febbee25d97c146a1955..56c13e7c6ceadf0e98c27e0b82b9615fb7d3dc62 100644 --- a/lib/modules/Protocols.pmod/IMAP.pmod/types.pmod +++ b/lib/modules/Protocols.pmod/IMAP.pmod/types.pmod @@ -26,6 +26,27 @@ class imap_atom string format() { return name; } } +class imap_atom_options +{ + string name; + array options; + array range; + + void create(string s, array o, array r) + { + name = s; + options = o; + range = r; + } + + string format() + { + return name + "[" + Array.map(options, imap_format) + "]" + // NOTE: Only the start index is sent + + (range ? sprintf("<%d>", range[0]) : ""); + } +} + class imap_string { string data;