Removed the commented-out vestiges of a spam strings checker begun before we decided...
authorArt Cancro <ajc@uncensored.citadel.org>
Tue, 28 Jun 2011 05:17:16 +0000 (01:17 -0400)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 21:01:49 +0000 (21:01 +0000)
citadel/modules/inetcfg/serv_inetcfg.c
citadel/modules/vcard/serv_vcard.c
citadel/modules/wiki/serv_wiki.c

index 3ac9339c2045d65573e411c741fe0053b6f3ea49..6d29311b3a5ef1da074abce2edf9f9d5ef2cb33b 100644 (file)
@@ -81,39 +81,6 @@ void inetcfg_setTo(struct CtdlMessage *msg) {
 }
 
 
-#ifdef ___NOT_CURRENTLY_IN_USE___
-void spamstrings_setTo(struct CtdlMessage *msg) {
-       char buf[SIZ];
-       char *conf;
-       struct spamstrings_t *sptr;
-       int i, n;
-
-       /* Clear out the existing list */
-       while (spamstrings != NULL) {
-               sptr = spamstrings;
-               spamstrings = spamstrings->next;
-               free(sptr->string);
-               free(sptr);
-       }
-
-       /* Read in the new list */
-       if (msg->cm_fields['M']==NULL) return;
-       conf = strdup(msg->cm_fields['M']);
-       if (conf == NULL) return;
-
-       n = num_tokens(conf, '\n');
-       for (i=0; i<n; ++i) {
-               extract_token(buf, conf, i, '\n', sizeof buf);
-               sptr = malloc(sizeof(struct spamstrings_t));
-               sptr->string = strdup(buf);
-               sptr->next = spamstrings;
-               spamstrings = sptr;
-       }
-
-}
-#endif
-
-
 /*
  * This handler detects changes being made to the system's Internet
  * configuration.
@@ -160,19 +127,6 @@ void inetcfg_init_backend(long msgnum, void *userdata) {
 }
 
 
-#ifdef ___NOT_CURRENTLY_IN_USE___
-void spamstrings_init_backend(long msgnum, void *userdata) {
-       struct CtdlMessage *msg;
-
-               msg = CtdlFetchMessage(msgnum, 1);
-               if (msg != NULL) {
-               spamstrings_setTo(msg);
-                       CtdlFreeMessage(msg);
-       }
-}
-#endif
-
-
 void inetcfg_init(void) {
        if (CtdlGetRoom(&CC->room, SYSCONFIGROOM) != 0) return;
        CtdlForEachMessage(MSGS_LAST, 1, NULL, INTERNETCFG, NULL,
index 8340d4eebad1a7632d5c03d3376fa6208b9d2fb3..7a0df9ae80f523a01b87a5db31d4e2d5a524f8f8 100644 (file)
@@ -198,7 +198,7 @@ void cmd_igab(char *argbuf) {
        CtdlDirectoryInit();
 
        /* We want *all* vCards in this room */
-       CtdlForEachMessage(MSGS_ALL, 0, NULL, "^[Tt][Ee][Xx][Tt]/.*[Vv][Cc][Aa][Rr][Dd]$",
+       CtdlForEachMessage(MSGS_ALL, 0, NULL, "[Tt][Ee][Xx][Tt]/.*[Vv][Cc][Aa][Rr][Dd]$",
                NULL, vcard_add_to_directory, NULL);
 
        CtdlGetRoom(&CC->room, hold_rm);        /* return to saved room */
@@ -393,7 +393,7 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) {
                 * vCard in the user's config room at all times.
                 *
                 */
-               CtdlDeleteMessages(CC->room.QRname, NULL, 0, "^[Tt][Ee][Xx][Tt]/.*[Vv][Cc][Aa][Rr][Dd]$");
+               CtdlDeleteMessages(CC->room.QRname, NULL, 0, "[Tt][Ee][Xx][Tt]/.*[Vv][Cc][Aa][Rr][Dd]$");
 
                /* Make the author of the message the name of the user. */
                if (msg->cm_fields['A'] != NULL) {
@@ -607,7 +607,7 @@ struct vCard *vcard_get_user(struct ctdluser *u) {
 
        /* We want the last (and probably only) vcard in this room */
        VCmsgnum = (-1);
-       CtdlForEachMessage(MSGS_LAST, 1, NULL, "^[Tt][Ee][Xx][Tt]/.*[Vv][Cc][Aa][Rr][Dd]$",
+       CtdlForEachMessage(MSGS_LAST, 1, NULL, "[Tt][Ee][Xx][Tt]/.*[Vv][Cc][Aa][Rr][Dd]$",
                NULL, vcard_gu_backend, (void *)&VCmsgnum );
        CtdlGetRoom(&CC->room, hold_rm);        /* return to saved room */
 
@@ -1323,7 +1323,7 @@ void store_this_ha(struct addresses_to_be_filed *aptr) {
 
        /* First remove any addresses we already have in the address book */
        CtdlUserGoto(aptr->roomname, 0, 0, NULL, NULL);
-       CtdlForEachMessage(MSGS_ALL, 0, NULL, "^[Tt][Ee][Xx][Tt]/.*[Vv][Cc][Aa][Rr][Dd]$", NULL,
+       CtdlForEachMessage(MSGS_ALL, 0, NULL, "[Tt][Ee][Xx][Tt]/.*[Vv][Cc][Aa][Rr][Dd]$", NULL,
                strip_addresses_already_have, aptr->collected_addresses);
 
        if (!IsEmptyStr(aptr->collected_addresses))
index 0399124b396e44949fccfdc29af3070d37fbbf89..49a039809f6a130237c845fc5e63a6e9826fc5d7 100644 (file)
@@ -239,6 +239,7 @@ int wiki_upload_beforesave(struct CtdlMessage *msg) {
         */
        if (history_msg->cm_fields['I'] != NULL) {
                free(history_msg->cm_fields['I']);
+               history_msg->cm_fields['I'] = NULL;
        }
 
        /* Figure out the boundary string.  We do this even when we generated the