X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=cgi%2Frss.c;h=f143e5586dbbde4e8bd086cdaaa2b75f2538c1e3;hb=839ecb35df4dba3ab86bfa45cc8135c59a58fcce;hp=1506b819f1a87573ce45850e6347534a51dbff16;hpb=47813df4231604c941e960fb7275cf6bb02802d2;p=blerg.git diff --git a/cgi/rss.c b/cgi/rss.c index 1506b81..f143e55 100644 --- a/cgi/rss.c +++ b/cgi/rss.c @@ -1,3 +1,6 @@ +/* Blerg is (C) 2011 The Dominion of Awesome, and is distributed under a + * BSD-style license. Please see the COPYING file for details. + */ #include #include #include @@ -6,6 +9,7 @@ #include "escapery.h" #include "canned_responses.h" #include "app.h" +#include "config.h" int fprint_rss(FILE *f, const char *username) { struct blerg *b = blerg_open(username); @@ -25,7 +29,7 @@ int fprint_rss(FILE *f, const char *username) { "%s#%s\n" "%s\n", username, - "http://blerg.dominionfawesome.com/", + BASEURL, username, "Textual vomit" ); @@ -38,9 +42,11 @@ int fprint_rss(FILE *f, const char *username) { fprintf(f, "\n" "%s\n" + "%sget/%s/%llu\n" "%s\n" "\n", date, + BASEURL, username, i, tmp ); free(tmp); @@ -84,18 +90,18 @@ int main (int argc, char *argv) { } ret = parse_url_info(path + 1, &info); - if ((ret & URL_INFO_AUTHOR) == 0) { + if ((ret & URL_INFO_NAME) == 0) { respond_404(); exit(0); } - if (!blerg_exists(info.author)) { + if (!blerg_exists(info.name)) { respond_404(); exit(0); } printf("Content-type: application/rss+xml\r\n\r\n"); - fprint_rss(stdout, "chip"); + fprint_rss(stdout, info.name); }