]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/dspam/serv_dspam.c
Removed references to Subversion in the code
[citadel.git] / citadel / modules / dspam / serv_dspam.c
index 1c0c0d7c4e9933669a5a3913710cf192361f7775..9f06f6e13a9db8d654b52a15be1dd6eb7fa15f00 100644 (file)
@@ -1,10 +1,22 @@
 /*
- * $Id: serv_dspam.c 5876 2007-12-10 23:22:03Z dothebart $
- *
  * This module glues libDSpam to the Citadel server in order to implement
  * DSPAM Spamchecking 
  *
- * This code is released under the terms of the GNU General Public License. 
+ * Copyright (c) 2009 by the citadel.org team
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "sysdep.h"
@@ -37,8 +49,6 @@
 #include "citserver.h"
 #include "support.h"
 #include "config.h"
-#include "room_ops.h"
-#include "policy.h"
 #include "database.h"
 #include "msgbase.h"
 #include "internet_addressing.h"
@@ -147,12 +157,12 @@ void dspam_do_msg(long msgnum, void *userdata)
        if (dspam_process (CTX, msgtext) != 0)
        {
                free(msgtext);
-               CtdlLogPrintf(CTDL_CRIT, "ERROR: dspam_process failed");
+               syslog(LOG_CRIT, "ERROR: dspam_process failed");
                return;
        }
        if (CTX->signature == NULL)
        {
-               CtdlLogPrintf(CTDL_CRIT,"No signature provided\n");
+               syslog(LOG_CRIT,"No signature provided\n");
        }
        else
        {
@@ -165,7 +175,7 @@ void dspam_do_msg(long msgnum, void *userdata)
 
        SIG.length = CTX->signature->length;
        /* Print processing results */
-       CtdlLogPrintf (CTDL_DEBUG, "Probability: %2.4f Confidence: %2.4f, Result: %s\n",
+       syslog(LOG_DEBUG, "Probability: %2.4f Confidence: %2.4f, Result: %s\n",
                CTX->probability,
                CTX->confidence,
                (CTX->result == DSR_ISSPAM) ? "Spam" : "Innocent");
@@ -204,7 +214,7 @@ int serv_dspam_room(struct ctdlroom *room)
        /// else -> todo: global user for public rooms etc.
        if (CTX == NULL)
        {
-               CtdlLogPrintf(CTDL_CRIT, "ERROR: dspam_init failed!\n");
+               syslog(LOG_CRIT, "ERROR: dspam_init failed!\n");
                return ERROR + INTERNAL_ERROR;
        }
        /* Use graham and robinson algorithms, graham's p-values */
@@ -228,7 +238,7 @@ void serv_dspam_shutdown (void)
 
 CTDL_MODULE_INIT(dspam)
 {
-       return "$Id: serv_dspam.c 5876 2007-12-10 23:22:03Z dothebart $" "disabled.";
+       return "disabled.";
        if (!threading)
        {
 #ifdef HAVE_LIBDSPAM
@@ -243,12 +253,12 @@ CTDL_MODULE_INIT(dspam)
 
 #else  /* HAVE_LIBDSPAM */
 
-               CtdlLogPrintf(CTDL_INFO, "This server is missing libdspam Spam filtering will be disabled.\n");
+               syslog(LOG_INFO, "This server is missing libdspam Spam filtering will be disabled.\n");
 
 #endif /* HAVE_LIBDSPAM */
        }
        
-        /* return our Subversion id for the Log */
-       return "$Id: serv_dspam.c 5876 2007-12-10 23:22:03Z dothebart $";
+        /* return our module name for the log */
+       return "dspam";
 }