in the server.
$Log$
+Revision 654.6 2005/08/09 21:58:57 ajc
+* Removed the ./help/? hack; replaced with actual "show directory" code
+ in the server.
+
Revision 654.5 2005/08/09 16:28:32 ajc
* setup.c: added "exim4" to the list of non-Citadel MTA's which can be
disabled during setup.
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
#include <ctype.h>
#include <string.h>
+#include <dirent.h>
#include <errno.h>
#include <limits.h>
/* #include <dlfcn.h> */
char buf[256];
char buf2[256];
char *dirs[2];
+ DIR *dp;
+ struct dirent *d;
extract_token(buf, mname, 0, '|', sizeof buf);
DATA_DIR"/"
#endif
"help");
- snprintf(buf2, sizeof buf2, "%s.%d.%d", buf, CC->cs_clientdev, CC->cs_clienttyp);
- mesg_locate(targ, sizeof targ, buf2, 2, (const char **)dirs);
- if (strlen(targ) == 0) {
- snprintf(buf2, sizeof buf2, "%s.%d", buf, CC->cs_clientdev);
+ snprintf(buf2, sizeof buf2, "%s.%d.%d",
+ buf, CC->cs_clientdev, CC->cs_clienttyp);
+
+ /* If the client requested "?" then produce a listing */
+ if (!strcmp(buf, "?")) {
+ cprintf("%d %s\n",LISTING_FOLLOWS,buf);
+ dp = opendir(dirs[1]);
+ if (dp != NULL) {
+ while (d = readdir(dp), d != NULL) {
+ if (d->d_name[0] != '.') {
+ cprintf(" %s\n", d->d_name);
+ }
+ }
+ closedir(dp);
+ }
+ cprintf("000\n");
+ }
+
+ /* Otherwise, look for the requested file by name. */
+ else {
mesg_locate(targ, sizeof targ, buf2, 2, (const char **)dirs);
if (strlen(targ) == 0) {
- mesg_locate(targ, sizeof targ, buf, 2, (const char **)dirs);
- }
+ snprintf(buf2, sizeof buf2, "%s.%d",
+ buf, CC->cs_clientdev);
+ mesg_locate(targ, sizeof targ, buf2, 2,
+ (const char **)dirs);
+ if (strlen(targ) == 0) {
+ mesg_locate(targ, sizeof targ, buf, 2,
+ (const char **)dirs);
+ }
+ }
}
+
free(dirs[0]);
free(dirs[1]);
The following commands are available only to Aides. A subset of these
commands are available to room aides when they are currently in the room
they are room aide for.
-
- .<A>ide <E>dit Room - edit current room's parameters
- .<A>ide <F>ile <D>elete - delete a file from the directory
- .<A>ide <F>ile <M>ove - move a file to another room
- .<A>ide <F>ile <S>end over net - send a file across the network
- .<A>ide enter <I>nfo file - create/change this room's info file
- .<A>ide <K>ill Room - delete the current room
- .<A>ide <R>oom <I>nvite user - add user to invitation-only room
- .<A>ide <R>oom <K>ick out user - delete user from invitation-only room
- .<A>ide <U>ser edit - change a user's access level
- .<A>ide <V>alidate new users - process new user registration
- .<A>ide <W>ho knows room - lists users with access to current room
+
+ <.> <A>ide <K>ill this room (Delete the current room)
+ <.> <A>ide <E>dit this room (Edit the current room's parameters)
+ <.> <A>ide <W>ho knows room (List users with access to this room)
+ <.> <A>ide edit <U>ser (Change user's access level, password, etc.)
+ <.> <A>ide <V>alidate new users (Process new user registrations)
+ <.> <A>ide enter <I>nfo file (Create/change this room's banner)
+ <.> <A>ide <R>oom <I>nvite user (Grant access to an invitation-only room)
+ <.> <A>ide <R>oom <K>ick out user (Revoke access to an invitation-only room)
+ <.> <A>ide <F>ile <D>elete (Delete a file from the room's directory)
+ <.> <A>ide <F>ile <S>end over net (Transmit a file to another node)
+ <.> <A>ide <F>ile <M>ove (Move a file to another room's directory)
+ <.> <A>ide <M>essage edit: (Edit system banners)
+ <.> <A>ide <P>ost (Post a message on behalf of another user)
+ <.> <A>ide <S>ystem configuration <G>eneral (Edit global site config)
+ <.> <A>ide <S>ystem configuration <I>nternet (Edit Internet domains)
+ <.> <A>ide <S>ystem configuration check <M>essage base (Internal checks)
+ <.> <A>ide <S>ystem configuration <N>etwork (Netting with other Citadels)
+ <.> <A>ide <S>ystem configuration network <F>ilter list
+ <.> <A>ide <T>erminate server <N>ow (Shut down Citadel server now)
+ <.> <A>ide <T>erminate server <S>cheduled (Shut down Citadel server later)
+ <.> <A>ide mailing <L>ist recipients (For mailing list rooms)
+ <.> <A>ide mailing list <D>igest recipients (For mailing list rooms)
+ <.> <A>ide <N>etwork room sharing (Replication with other Citadels)
In addition, the <M>ove and <D>elete commands are available at the
message prompt.