* \param roomname the room we sould print out as rss
* \param request_method the way the rss is requested????
*/
-void display_rss(char *roomname, char *request_method)
+void display_rss(char *roomname, StrBuf *request_method)
{
int nummsgs;
int a, b;
hprintf("Content-Type: application/rss+xml\r\n");
hprintf("Server: %s\r\n", PACKAGE_STRING);
hprintf("Connection: close\r\n");
- if (!strcasecmp(request_method, "HEAD"))
+ if (!strcasecmp(ChrPtr(request_method), "HEAD"))
return;
/* <?xml.. etc confuses our subst parser, so do it here */
svput("822_PUB_DATE", WCS_STRING, date);
}
svput("GENERATOR", WCS_STRING, PACKAGE_STRING);
- do_template("rss_head");
+ do_template("rss_head", NULL);
/** Read all messages and output as RSS items */
for (a = 0; a < nummsgs; ++a) {
svprintf(HKEY("822_PUB_DATE"),WCS_STRING, _("%s"), date);
}
svprintf(HKEY("GUID"), WCS_STRING,"%s", msgn);
- do_template("rss_item");
+ do_template("rss_item", NULL);
/** Now the hard part, the message itself */
strcpy(content_type, "text/plain");
while (serv_getln(buf, sizeof buf), !IsEmptyStr(buf)) {
}
/** HTML is fun, but we've got to strip it first */
else if (!strcasecmp(content_type, "text/html")) {
- output_html(charset, 0);
+ output_html(charset, 0, WC->msgarr[a]);
}
ENDBODY:
//wprintf(" </item>\n");
- do_template("rss_item_end");
+ do_template("rss_item_end", NULL);
ENDITEM:
now = 0L;
}