El 20/02/2015 a las 10:25, Matthew Wild escribió:
Hi Nicolás,
On 20 February 2015 at 06:59, Nicolás <[email protected]> wrote:
Hi,
I'm trying to define a key/value table in the configuration file, like this:
a = {
["key"] = "value"
}
However, seems that inside the plugin function, at retrieve time via
module:get_option_set('a', '{}') it retrieves an empty table. However, if I
just define a value instead of key/value, the table is retrieved correctly.
You should use just module:get_option() for that kind of table.
module:get_option_set() is for lists of unique values.
Also, in the config you do not need to use the ["key"] syntax unless
you have special characters in the key name. For example, this is the
same as your example:
Thanks so much, that did the trick! In my case the ["key"] syntax is
needed because the keys will be regexps, so we may find some special
characters there :-P
Regards.
--
You received this message because you are subscribed to the Google Groups
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.