From 6a97cac667573dd2950e80aa7e371e9b7fd4dae8 Mon Sep 17 00:00:00 2001 From: "B.Greenham" Date: Fri, 5 Mar 2010 11:57:48 -0500 Subject: [PATCH] Make channel_metadata_time_add accept a regular value as well as a time value. --- include/channel.h | 2 +- src/channel.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/channel.h b/include/channel.h index 417ec61..cc76efb 100644 --- a/include/channel.h +++ b/include/channel.h @@ -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); diff --git a/src/channel.c b/src/channel.c index e14d610..07977a2 100644 --- a/src/channel.c +++ b/src/channel.c @@ -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);