]> code.citadel.org Git - citadel.git/blobdiff - citadel/user_ops.c
Replaced some of the 'autoconverted - document me' strings
[citadel.git] / citadel / user_ops.c
index ed726858709fa66fe4aeb7e61c27dd99bbe210b2..2737c0446d78111af898ba3506d897fdd851afdb 100644 (file)
@@ -1,8 +1,5 @@
 /* 
- * $Id$
- *
  * Server functions which perform operations on user objects.
- *
  */
 
 #include "sysdep.h"
@@ -742,7 +739,7 @@ void do_login(void)
        CtdlCreateRoom(MAILROOM, 4, "", 0, 1, 0, VIEW_MAILBOX);
        CtdlCreateRoom(SENTITEMS, 4, "", 0, 1, 0, VIEW_MAILBOX);
        CtdlCreateRoom(USERTRASHROOM, 4, "", 0, 1, 0, VIEW_MAILBOX);
-       /* CtdlCreateRoom(USERDRAFTROOM, 4, "", 0, 1, 0, VIEW_MAILBOX); temporarily disabled for 7.60 */
+       CtdlCreateRoom(USERDRAFTROOM, 4, "", 0, 1, 0, VIEW_MAILBOX);
 
        /* Run any startup routines registered by loadable modules */
        PerformSessionHooks(EVT_LOGIN);
@@ -1109,8 +1106,6 @@ int internal_create_user (const char *username, long len, struct ctdluser *usbuf
        usbuf->timescalled = 0;
        usbuf->posted = 0;
        usbuf->axlevel = config.c_initax;
-       usbuf->USscreenwidth = 80;
-       usbuf->USscreenheight = 24;
        usbuf->lastcall = time(NULL);
 
        /* fetch a new user number */
@@ -1415,12 +1410,10 @@ void cmd_getu(char *cmdbuf)
                return;
 
        CtdlGetUser(&CC->user, CC->curr_user);
-       cprintf("%d %d|%d|%d|\n",
+       cprintf("%d 80|24|%d|\n",
                CIT_OK,
-               CC->user.USscreenwidth,
-               CC->user.USscreenheight,
                (CC->user.flags & US_USER_SET)
-           );
+       );
 }
 
 /*
@@ -1436,12 +1429,8 @@ void cmd_setu(char *new_parms)
                return;
        }
        CtdlGetUserLock(&CC->user, CC->curr_user);
-       CC->user.USscreenwidth = extract_int(new_parms, 0);
-       CC->user.USscreenheight = extract_int(new_parms, 1);
        CC->user.flags = CC->user.flags & (~US_USER_SET);
-       CC->user.flags = CC->user.flags |
-           (extract_int(new_parms, 2) & US_USER_SET);
-
+       CC->user.flags = CC->user.flags | (extract_int(new_parms, 2) & US_USER_SET);
        CtdlPutUserLock(&CC->user);
        cprintf("%d Ok\n", CIT_OK);
 }
@@ -1568,8 +1557,9 @@ void cmd_invt_kick(char *iuser, int op) {
         * These commands are only allowed by aides, room aides,
         * and room namespace owners
         */
-       if (is_room_aide()
-          || (atol(CC->room.QRname) == CC->user.usernum) ) {
+       if (is_room_aide()) {
+               /* access granted */
+       } else if ( ((atol(CC->room.QRname) == CC->user.usernum) ) && (CC->user.usernum != 0) ) {
                /* access granted */
        } else {
                /* access denied */
@@ -2066,19 +2056,19 @@ void cmd_renu(char *cmdbuf)
 CTDL_MODULE_INIT(user_ops)
 {
        if (!threading) {
-               CtdlRegisterProtoHook(cmd_user, "USER", "Autoconverted. TODO: document me.");
-               CtdlRegisterProtoHook(cmd_pass, "PASS", "Autoconverted. TODO: document me.");
-               CtdlRegisterProtoHook(cmd_creu, "CREU", "Autoconverted. TODO: document me.");
-               CtdlRegisterProtoHook(cmd_setp, "SETP", "Autoconverted. TODO: document me.");
-               CtdlRegisterProtoHook(cmd_getu, "GETU", "Autoconverted. TODO: document me.");
-               CtdlRegisterProtoHook(cmd_setu, "SETU", "Autoconverted. TODO: document me.");
-               CtdlRegisterProtoHook(cmd_slrp, "SLRP", "Autoconverted. TODO: document me.");
-               CtdlRegisterProtoHook(cmd_invt, "INVT", "Autoconverted. TODO: document me.");
-               CtdlRegisterProtoHook(cmd_kick, "KICK", "Autoconverted. TODO: document me.");
-               CtdlRegisterProtoHook(cmd_forg, "FORG", "Autoconverted. TODO: document me.");
+               CtdlRegisterProtoHook(cmd_user, "USER", "Submit username for login");
+               CtdlRegisterProtoHook(cmd_pass, "PASS", "Complete login by submitting a password");
+               CtdlRegisterProtoHook(cmd_creu, "CREU", "Create User");
+               CtdlRegisterProtoHook(cmd_setp, "SETP", "Set the password for an account");
+               CtdlRegisterProtoHook(cmd_getu, "GETU", "Get User parameters");
+               CtdlRegisterProtoHook(cmd_setu, "SETU", "Set User parameters");
+               CtdlRegisterProtoHook(cmd_slrp, "SLRP", "Set Last Read Pointer");
+               CtdlRegisterProtoHook(cmd_invt, "INVT", "Invite a user to a room");
+               CtdlRegisterProtoHook(cmd_kick, "KICK", "Kick a user out of a room");
+               CtdlRegisterProtoHook(cmd_forg, "FORG", "Forget a room");
                CtdlRegisterProtoHook(cmd_gnur, "GNUR", "Autoconverted. TODO: document me.");
-               CtdlRegisterProtoHook(cmd_vali, "VALI", "Autoconverted. TODO: document me.");
-               CtdlRegisterProtoHook(cmd_list, "LIST", "Autoconverted. TODO: document me.");
+               CtdlRegisterProtoHook(cmd_vali, "VALI", "Validate new users");
+               CtdlRegisterProtoHook(cmd_list, "LIST", "List users");
                CtdlRegisterProtoHook(cmd_chek, "CHEK", "Autoconverted. TODO: document me.");
                CtdlRegisterProtoHook(cmd_qusr, "QUSR", "Autoconverted. TODO: document me.");
                CtdlRegisterProtoHook(cmd_agup, "AGUP", "Autoconverted. TODO: document me.");
@@ -2090,5 +2080,5 @@ CTDL_MODULE_INIT(user_ops)
                CtdlRegisterProtoHook(cmd_newu, "NEWU", "Autoconverted. TODO: document me.");
        }
        /* return our Subversion id for the Log */
-       return "$Id$";
+       return "user_ops";
 }