X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/35bcce6a1de6dae5644b80bea23ca81cf273b181..3898f97325dbed800d4b424e68a0c2858b8d8be7:/helpmod2/hconf.c diff --git a/helpmod2/hconf.c b/helpmod2/hconf.c index 0e287f77..2de5ba2a 100644 --- a/helpmod2/hconf.c +++ b/helpmod2/hconf.c @@ -830,7 +830,22 @@ int helpmod_config_read_ticket(FILE *in) return -1; if (tmp > time(NULL)) - hticket_add(buf3, tmp, hchannel_get_by_name(buf2)); + { + if (hconf_version < HELPMOD_VERSION_2_17) + hticket_add(buf3, tmp, hchannel_get_by_name(buf2), NULL); + else + { + fgets(ptr = buf, 256, in); + if (feof(in)) + return -1; + helpmod_line_fix(&ptr); + + if (*ptr == '\0') + hticket_add(buf3, tmp, hchannel_get_by_name(buf2), NULL); + else + hticket_add(buf3, tmp, hchannel_get_by_name(buf2), ptr); + } + } return 0; } @@ -840,6 +855,10 @@ int helpmod_config_write_ticket(FILE *out, hticket *htick, hchannel *hchan) fprintf(out, "\t%s\n", hchannel_get_name(hchan)); fprintf(out, "\t%s\n", htick->authname); fprintf(out, "\t%u\n", (unsigned int)htick->time_expiration); + if (htick->message) + fprintf(out, "\t%s\n", htick->message->content); + else + fprintf(out, "\n"); return 0; }