]> code.citadel.org Git - citadel.git/blobdiff - webcit/pushemail.c
* add first draft of group-change detection
[citadel.git] / webcit / pushemail.c
index 60cb62f6ef44a6af50e25b61276cd6a2f605bac0..3346d83ba2061de9ead1acf3b96f2a6946d1f86e 100644 (file)
@@ -27,13 +27,13 @@ void display_pushemail(void) {
                        
                }
                if (msgnum > 0L) {
-               serv_printf("MSG0 %ld", msgnum);
+               serv_printf("MSG0 %d", msgnum);
                serv_getln(buf, sizeof buf);
                if (buf[0] == '1') {
+                       int i =0;
                        while (serv_getln(buf, sizeof buf),
                                (strcmp(buf, "text") && strcmp(buf, "000"))) {
                        }
-                       int i =0;
                        if (!strcmp(buf, "text")) {
                                while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) { 
                                        if (strncasecmp(buf, "none", 4) == 0) {
@@ -62,10 +62,10 @@ void display_pushemail(void) {
        serv_printf("GOTO %s", WC->wc_roomname);
        serv_getln(buf, sizeof  buf);
        }
-output_headers(1, 1, 2, 0, 0, 0);
-do_template("pushemail");
-//do_template("endbox");
-wDumpContent(1);
+       output_headers(1, 1, 2, 0, 0, 0);
+       do_template("pushemail", NULL);
+/*do_template("endbox"); */
+       wDumpContent(1);
 }
 
 void save_pushemail(void) {
@@ -91,7 +91,7 @@ void save_pushemail(void) {
        }
 
        if (msgnum > 0L) {
-               serv_printf("DELE %ld", msgnum);
+               serv_printf("DELE %d", msgnum);
                serv_getln(buf, sizeof buf);
        }
 
@@ -111,3 +111,11 @@ void save_pushemail(void) {
        serv_getln(buf, sizeof buf);
        http_redirect("display_pushemail");
 }
+
+void 
+InitModule_PUSHMAIL
+(void)
+{
+       WebcitAddUrlHandler(HKEY("display_pushemail"), display_pushemail, 0);
+       WebcitAddUrlHandler(HKEY("save_pushemail"), save_pushemail, 0);
+}