]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_managesieve.c
mk_module_init.sh now tests to see if echo supports -e and -E
[citadel.git] / citadel / serv_managesieve.c
index 608318fb6e8148231a043524951ea7faa3d30ca7..c43d8aa192ceac085610b4da2eba4f147f98ac22 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * $Id$
+ * $Id$
  *
  * This module is an managesieve implementation for the Citadel system.
  * It is compliant with all of the following:
 #include <arpa/inet.h>
 #include "citadel.h"
 #include "server.h"
-#include "sysdep_decls.h"
 #include "citserver.h"
 #include "support.h"
 #include "config.h"
 #include "control.h"
-#include "serv_extensions.h"
 #include "room_ops.h"
 #include "user_ops.h"
 #include "policy.h"
 #include "snprintf.h"
 #endif
 
+
+#include "ctdl_module.h"
+
+
+
 #ifdef HAVE_LIBSIEVE
 
 #include "serv_sieve.h"
@@ -222,7 +225,7 @@ void cmd_mgsve_auth(int num_parms, char **parms, struct sdm_userdata *u)
                else 
                        retval = CtdlDecodeBase64(auth, parms[2], SIZ);
 
-               if (login_ok == CtdlLoginExistingUser(auth))
+               if (login_ok == CtdlLoginExistingUser(NULL, auth))
                {
                        char *pass;
                        pass = &(auth[strlen(auth)+1]);
@@ -571,25 +574,27 @@ void managesieve_command_loop(void) {
 }
 
 
+#endif /* HAVE_LIBSIEVE */
 
-char *serv_managesieve_init(void)
+CTDL_MODULE_INIT(managesieve)
 {
 
+#ifdef HAVE_LIBSIEVE
+
        CtdlRegisterServiceHook(config.c_managesieve_port,      /* MGSVE */
                                NULL,
                                managesieve_greeting,
                                managesieve_command_loop,
                                NULL);
 
-       return "$Id: serv_managesieve.c 4570 2006-08-27 02:07:18Z dothebart $";
-}
-
 #else  /* HAVE_LIBSIEVE */
 
-char *serv_managesieve_init(void)
-{
        lprintf(CTDL_INFO, "This server is missing libsieve.  Managesieve protocol is disabled..\n");
-       return "$Id:  $";
-}
 
 #endif /* HAVE_LIBSIEVE */
+
+       /* return our Subversion id for the Log */
+       return "$Id$";
+}
+
+