#include <stdio.h>
+#include "../lib/version.h"
#include "../core/schedule.h"
#include "../control/control.h"
#include "glines.h"
+MODULE_VERSION("");
+
static int glstore_savefile(const char *file) {
FILE *fp;
gline *gl;
fprintf(fp, "%s %jd,%jd,%jd,%d,%s,%s\n",
glinetostring(gl), (intmax_t)gl->expire, (intmax_t)gl->lastmod, (intmax_t)gl->lifetime,
(gl->flags & GLINE_ACTIVE) ? 1 : 0,
- gl->creator->content, gl->reason->content);
+ gl->creator->content, gl->reason ? gl->reason->content : "");
count++;
}
gl->creator = getsstring(creator, 512);
- gl->flags = active ? GLINE_ACTIVE : 0;
+ gl->flags |= active ? GLINE_ACTIVE : 0;
gl->reason = getsstring(reason, 512);
gl->expire = expire;