Make channel_metadata_time_add accept a regular value as well as a time value.
This commit is contained in:
parent
870b1b4694
commit
6a97cac667
|
@ -303,7 +303,7 @@ extern void channel_metadata_delete(struct Channel *target, const char *name, in
|
||||||
extern struct Metadata *channel_metadata_find(struct Channel *target, const char *name);
|
extern struct Metadata *channel_metadata_find(struct Channel *target, const char *name);
|
||||||
|
|
||||||
extern struct Metadata *channel_metadata_add(struct Channel *target, const char *name, const char *value, int propegate);
|
extern struct Metadata *channel_metadata_add(struct Channel *target, const char *name, const char *value, int propegate);
|
||||||
extern struct Metadata *channel_metadata_time_add(struct Channel *target, const char *name, time_t value);
|
extern struct Metadata *channel_metadata_time_add(struct Channel *target, const char *name, time_t timevalue, const char *value);
|
||||||
extern void channel_metadata_delete(struct Channel *target, const char *name, int propegate);
|
extern void channel_metadata_delete(struct Channel *target, const char *name, int propegate);
|
||||||
extern struct Metadata *channel_metadata_find(struct Channel *target, const char *name);
|
extern struct Metadata *channel_metadata_find(struct Channel *target, const char *name);
|
||||||
extern void channel_metadata_clear(struct Channel *target);
|
extern void channel_metadata_clear(struct Channel *target);
|
||||||
|
|
|
@ -1954,17 +1954,19 @@ channel_metadata_add(struct Channel *target, const char *name, const char *value
|
||||||
* inputs - pointer to channel struct
|
* inputs - pointer to channel struct
|
||||||
* - name of metadata item you wish to add
|
* - name of metadata item you wish to add
|
||||||
* - time_t you wish to add
|
* - time_t you wish to add
|
||||||
|
* - value you wish to add
|
||||||
* output - none
|
* output - none
|
||||||
* side effects - metadata is added to the channel in question
|
* side effects - metadata is added to the channel in question
|
||||||
*/
|
*/
|
||||||
struct Metadata *
|
struct Metadata *
|
||||||
channel_metadata_time_add(struct Channel *target, const char *name, time_t value)
|
channel_metadata_time_add(struct Channel *target, const char *name, time_t timevalue, const char *value)
|
||||||
{
|
{
|
||||||
struct Metadata *md;
|
struct Metadata *md;
|
||||||
|
|
||||||
md = rb_malloc(sizeof(struct Metadata));
|
md = rb_malloc(sizeof(struct Metadata));
|
||||||
md->name = rb_strdup(name);
|
md->name = rb_strdup(name);
|
||||||
md->timevalue = value;
|
md->value = rb_strdup(value);
|
||||||
|
md->timevalue = timevalue;
|
||||||
|
|
||||||
irc_dictionary_add(target->metadata, md->name, md);
|
irc_dictionary_add(target->metadata, md->name, md);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue