X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fctdlproto%2Fserv_user.c;fp=citadel%2Fmodules%2Fctdlproto%2Fserv_user.c;h=caff5efb0c045b516bc5d4c6df627188acd4ca87;hb=5fa46a04753f5074ab32031e9b1b037c2895621f;hp=a632aa43f370632d828f9e893aed40807962a2e3;hpb=60e4aee68ed95e7ec91efcf7305f8daaf1193d75;p=citadel.git diff --git a/citadel/modules/ctdlproto/serv_user.c b/citadel/modules/ctdlproto/serv_user.c index a632aa43f..caff5efb0 100644 --- a/citadel/modules/ctdlproto/serv_user.c +++ b/citadel/modules/ctdlproto/serv_user.c @@ -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";