Make channel_metadata_time_add accept a regular value as well as a time value.

This commit is contained in:
B.Greenham 2010-03-05 11:57:48 -05:00
parent 870b1b4694
commit 6a97cac667
2 changed files with 5 additions and 3 deletions

View File

@ -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_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 struct Metadata *channel_metadata_find(struct Channel *target, const char *name);
extern void channel_metadata_clear(struct Channel *target);

View File

@ -1954,17 +1954,19 @@ channel_metadata_add(struct Channel *target, const char *name, const char *value
* inputs - pointer to channel struct
* - name of metadata item you wish to add
* - time_t you wish to add
* - value you wish to add
* output - none
* side effects - metadata is added to the channel in question
*/
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;
md = rb_malloc(sizeof(struct Metadata));
md->name = rb_strdup(name);
md->timevalue = value;
md->value = rb_strdup(value);
md->timevalue = timevalue;
irc_dictionary_add(target->metadata, md->name, md);