move cmd_isme to serv_user.c
authorWilfried Goesgens <dothebart@citadel.org>
Sat, 14 Sep 2013 20:30:41 +0000 (22:30 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sat, 14 Sep 2013 20:30:41 +0000 (22:30 +0200)
citadel/internet_addressing.c
citadel/modules/ctdlproto/serv_user.c
citadel/scripts/mk_module_init.sh

index a1b0a37e176c84748abdb35f90d6202a5b2a5720..bc60368e6de1806f49f56f0327316f5c4a48fa65 100644 (file)
@@ -355,25 +355,6 @@ int CtdlIsMe(char *addr, int addr_buf_len)
 }
 
 
-/*
- * Citadel protocol command to do the same
- */
-void cmd_isme(char *argbuf) {
-       char addr[256];
-
-       if (CtdlAccessCheck(ac_logged_in)) return;
-       extract_token(addr, argbuf, 0, '|', sizeof addr);
-
-       if (CtdlIsMe(addr, sizeof addr)) {
-               cprintf("%d %s\n", CIT_OK, addr);
-       }
-       else {
-               cprintf("%d Not you.\n", ERROR + ILLEGAL_VALUE);
-       }
-
-}
-
-
 /* If the last item in a list of recipients was truncated to a partial address,
  * remove it completely in order to avoid choking libSieve
  */
@@ -1703,12 +1684,3 @@ char *harvest_collected_addresses(struct CtdlMessage *msg) {
        }
        return(coll);
 }
-
-
-CTDL_MODULE_INIT(internet_addressing)
-{
-       if (!threading) {
-               CtdlRegisterProtoHook(cmd_isme, "ISME", "Determine whether an email address belongs to a user");
-       }
-       return "internet_addressing";
-}
index a632aa43f370632d828f9e893aed40807962a2e3..caff5efb0c045b516bc5d4c6df627188acd4ca87 100644 (file)
@@ -698,6 +698,25 @@ void cmd_asup(char *cmdbuf)
 }
 
 
+/*
+ * Citadel protocol command to do the same
+ */
+void cmd_isme(char *argbuf) {
+       char addr[256];
+
+       if (CtdlAccessCheck(ac_logged_in)) return;
+       extract_token(addr, argbuf, 0, '|', sizeof addr);
+
+       if (CtdlIsMe(addr, sizeof addr)) {
+               cprintf("%d %s\n", CIT_OK, addr);
+       }
+       else {
+               cprintf("%d Not you.\n", ERROR + ILLEGAL_VALUE);
+       }
+
+}
+
+
 /*
  * Set the preferred view for the current user/room combination
  */
@@ -804,6 +823,7 @@ CTDL_MODULE_INIT(serv_user)
                CtdlRegisterProtoHook(cmd_view, "VIEW", "Set preferred view for user/room combination");
                CtdlRegisterProtoHook(cmd_renu, "RENU", "Rename a user");
                CtdlRegisterProtoHook(cmd_newu, "NEWU", "Log in as a new user");
+               CtdlRegisterProtoHook(cmd_isme, "ISME", "Determine whether an email address belongs to a user");
        }
        /* return our Subversion id for the Log */
        return "user";
index e0642bb1369b7fe4b0c099e240ee2c9eea8273c0..9bf2003af6c6584fe3a66ee4a88f95fa669c986b 100755 (executable)
@@ -30,7 +30,7 @@ U_FILE="$CUR_DIR/modules_upgrade.c"
 
 /usr/bin/printf "Scanning extension modules for entry points.\n"
 
-STATIC_FIRST_MODULES="control modules euidindex msgbase nttlist database internet_addressing"
+STATIC_FIRST_MODULES="control modules euidindex msgbase nttlist database"
 DYNAMIC_MODULES=`grep CTDL_MODULE_INIT modules/*/*.c |$SED 's;.*(\(.*\));\1;'`
 if test -d user_modules; then 
     USER_MODULES=`grep CTDL_MODULE_INIT user_modules/*/*.c |$SED 's;.*(\(.*\));\1;'`