4 * citadel.c - Main source file.
16 #include <sys/types.h>
19 #include <sys/ioctl.h>
33 #define IFEXPERT if (userflags&US_EXPERT)
34 #define IFNEXPERT if ((userflags&US_EXPERT)==0)
35 #define IFAIDE if (axlevel>=6)
36 #define IFNAIDE if (axlevel<6)
38 struct march *march = NULL;
43 void load_command_set();
62 void attach_to_server();
90 void load_floorlist();
96 void misc_server_cmd();
100 void edit_system_message();
101 void send_ansi_detect();
102 void look_for_ansi();
103 void cli_image_upload();
106 /* globals associated with the client program */
107 char temp[16]; /* Name of general temp file */
108 char temp2[16]; /* Name of general temp file */
109 char tempdir[16]; /* Name of general temp dir */
110 char editor_path[256]; /* path to external editor */
111 char printcmd[256]; /* print command */
112 int editor_pid = (-1);
115 struct CtdlServInfo serv_info; /* Info on the server connected */
121 long uglsn; /* holds <u>ngoto info */
122 char is_mail = 0; /* nonzero when we're in a mail room */
123 char axlevel = 0; /* access level */
124 char is_room_aide = 0; /* boolean flag, 1 if room aide */
128 long usernum = 0L; /* user number */
130 long highest_msg_read; /* used for <A>bandon room cmd */
131 long maxmsgnum; /* used for <G>oto */
133 char have_xterm = 0; /* are we running on an xterm? */
134 char rc_username[32];
135 char rc_password[32];
138 char curr_floor = 0; /* number of current floor */
139 char floorlist[128][256]; /* names of floors */
140 char express_msgs = 0; /* express messages waiting! */
141 char last_paged[32]="";
143 extern char server_is_local; /* defined in ipc module */
146 * here is our 'clean up gracefully and exit' routine
150 if (editor_pid>0) { /* kill the editor if it's running */
151 kill(editor_pid,SIGHUP);
154 /* shut down the server... but not if the logoff code is 3, because
155 * that means we're exiting because we already lost the server
157 if (code!=3) serv_puts("QUIT");
160 * now clean up various things
167 /* Violently kill off any child processes if Citadel is
171 kill(0-getpgrp(),SIGTERM);
173 kill(0-getpgrp(),SIGKILL);
176 sttybbs(SB_RESTORE); /* return the old terminal settings */
177 exit(code); /* exit with the proper exit code */
183 * We handle "next" and "stop" much differently than in earlier versions.
184 * The signal catching routine simply sets a flag and returns.
186 void sighandler(which_sig)
188 signal(SIGINT,SIG_IGN);
189 signal(SIGQUIT,SIG_IGN);
190 sigcaught = which_sig;
196 * signal catching function for hangups...
204 /* general purpose routines */
206 void formout(name) /* display a file */
210 sprintf(cmd,"MESG %s",name);
214 printf("%s\n",&cmd[4]);
217 fmout(screenwidth,NULL,
218 ((userflags & US_PAGINATOR) ? 1 : 0),
233 printf("%s\n",&buf[4]);
237 sttybbs(SB_YES_INTR);
238 printf(" User Name Num L LastCall Calls Posts\n");
239 printf("------------------------- ----- - ---------- ----- -----\n");
240 while (serv_gets(buf), strcmp(buf,"000")) {
241 if (sigcaught == 0) {
244 printf("%5ld %d ",extract_long(buf,2),
246 lc = extract_long(buf,3);
247 tmbuf = (struct tm *)localtime(&lc);
248 printf("%02d/%02d/%04d ",
251 (tmbuf->tm_year + 1900));
252 printf("%5ld %5ld\n",extract_long(buf,4),extract_long(buf,5));
255 linecount = checkpagin(linecount,
256 ((userflags & US_PAGINATOR) ? 1 : 0),
267 * grab assorted info about the user...
269 void load_user_info(params)
271 extract(fullname,params,0);
272 axlevel = extract_int(params,1);
273 timescalled = extract_int(params,2);
274 posted = extract_int(params,3);
275 userflags = extract_int(params,4);
276 usernum = extract_long(params,5);
281 * Remove a room from the march list. 'floornum' is ignored unless
282 * 'roomname' is set to _FLOOR_, in which case all rooms on the requested
283 * floor will be removed from the march list.
285 void remove_march(roomname,floornum)
288 struct march *mptr,*mptr2;
290 if (march==NULL) return;
292 if ( (!strucmp(march->march_name,roomname))
293 || ((!strucmp(roomname,"_FLOOR_"))&&(march->march_floor==floornum))) {
301 for (mptr=march; mptr!=NULL; mptr=mptr->next) {
303 if ( (!strucmp(mptr->march_name,roomname))
304 || ((!strucmp(roomname,"_FLOOR_"))
305 &&(mptr->march_floor==floornum))) {
307 mptr2->next = mptr->next;
318 * sort the march list by floor
320 void sort_march_list() {
321 struct march *mlist[129];
322 struct march *mptr = NULL;
325 if (march == NULL) return;
327 for (a=0; a<129; ++a) mlist[a] = NULL;
329 /* first, create 128 separate lists for each floor. */
330 while (march != NULL) {
332 a = (int)(march->march_floor);
334 /* assign an illegal floor number of 128 to _BASEROOM_
335 * in order to force it to show up last */
336 if (!strucmp(march->march_name,"_BASEROOM_")) a = 128;
340 mptr->next = mlist[a];
344 /* now merge the lists, in order, into one big list,
345 * except the current floor
347 for (a=128; a>=0; --a) if (a != curr_floor) {
348 while (mlist[a] != NULL) {
350 mlist[a] = mlist[a]->next;
356 /* now merge in rooms from the current floor */
357 while (mlist[(int)curr_floor] != NULL) {
358 mptr = mlist[(int)curr_floor];
359 mlist[(int)curr_floor] = mlist[(int)curr_floor]->next;
369 * jump directly to a room
371 void dotgoto(towhere,display_name)
374 char aaa[256],bbb[256],psearch[256];
377 static int oldmailcount = (-1);
378 int partial_match,best_match;
381 /* store ungoto information */
382 strcpy(ugname,room_name);
385 /* first try an exact match */
386 sprintf(aaa,"GOTO %s",towhere);
389 if (aaa[3]=='*') express_msgs = 1;
390 if (!strncmp(aaa,"54",2)) {
391 newprompt("Enter room password: ",bbb,9);
392 sprintf(aaa,"GOTO %s|%s",towhere,bbb);
395 if (aaa[3]=='*') express_msgs = 1;
397 if (!strncmp(aaa,"54",2)) {
398 printf("Wrong password.\n");
404 * If a match is not found, try a partial match.
405 * Partial matches anywhere in the string carry a weight of 1,
406 * left-aligned matches carry a weight of 2. Pick the room that
407 * has the highest-weighted match.
414 if (aaa[0]=='1') while (serv_gets(aaa), strcmp(aaa,"000")) {
415 extract(psearch,aaa,0);
417 if (pattern(psearch,towhere)>=0) {
420 if (!struncmp(towhere,psearch,strlen(towhere))) {
423 if (partial_match > best_match) {
425 best_match = partial_match;
428 if (strlen(bbb)==0) {
429 printf("No room '%s'.\n",towhere);
432 sprintf(aaa,"GOTO %s",bbb);
435 if (aaa[3]=='*') express_msgs = 1;
443 extract(room_name,&aaa[4],0);
444 room_flags = extract_int(&aaa[4],4);
445 from_floor = curr_floor;
446 curr_floor = extract_int(&aaa[4],10);
448 remove_march(room_name,0);
449 if (!strucmp(towhere,"_BASEROOM_")) remove_march(towhere,0);
450 if ((from_floor!=curr_floor) && (display_name>0) && (floor_mode==1)) {
451 if (floorlist[(int)curr_floor][0]==0) load_floorlist();
452 printf("(Entering floor: %s)\n",&floorlist[(int)curr_floor][0]);
454 if (display_name == 1) printf("%s - ",room_name);
455 if (display_name != 2) printf("%d new of %d messages.\n",
456 extract_int(&aaa[4],1),
457 extract_int(&aaa[4],2));
458 highest_msg_read = extract_int(&aaa[4],6);
459 maxmsgnum = extract_int(&aaa[4],5);
460 is_mail = (char) extract_int(&aaa[4],7);
461 is_room_aide = (char) extract_int(&aaa[4],8);
462 ls = extract_long(&aaa[4],6);
464 /* read info file if necessary */
465 if (extract_int(&aaa[4],3) > 0) readinfo();
467 /* check for newly arrived mail if we can */
468 if (num_parms(&aaa[4])>=10) {
469 newmailcount = extract_int(&aaa[4],9);
470 if ( (oldmailcount >= 0) && (newmailcount > oldmailcount) )
471 printf("*** You have new mail\n");
472 oldmailcount = newmailcount;
476 /* Goto next room having unread messages.
477 * We want to skip over rooms that the user has already been to, and take the
478 * user back to the lobby when done. The room we end up in is placed in
479 * newroom - which is set to 0 (the lobby) initially.
480 * We start the search in the current room rather than the beginning to prevent
481 * two or more concurrent users from dragging each other back to the same room.
485 struct march *mptr,*mptr2;
488 /* First check to see if the march-mode list is already allocated.
489 * If it is, pop the first room off the list and go there.
496 while (serv_gets(buf), strcmp(buf,"000")) {
497 mptr = (struct march *) malloc(sizeof(struct march));
499 extract(mptr->march_name,buf,0);
500 mptr->march_floor = (char) (extract_int(buf,2) & 0x7F);
506 while (mptr2->next != NULL)
512 /* add _BASEROOM_ to the end of the march list, so the user will end up
513 * in the system base room (usually the Lobby>) at the end of the loop
515 mptr = (struct march *) malloc(sizeof(struct march));
517 strcpy(mptr->march_name,"_BASEROOM_");
523 while (mptr2->next != NULL)
528 * ...and remove the room we're currently in, so a <G>oto doesn't make us
529 * walk around in circles
531 remove_march(room_name,0);
537 strcpy(next_room,march->march_name);
540 strcpy(next_room,"_BASEROOM_");
542 remove_march(next_room,0);
543 dotgoto(next_room,1);
547 * forget all rooms on a given floor
549 void forget_all_rooms_on(ffloor)
552 struct march *flist,*fptr;
554 printf("Forgetting all rooms on %s...\r",&floorlist[ffloor][0]);
556 sprintf(buf,"LKRA %d",ffloor);
560 printf("%-72s\n",&buf[4]);
564 while (serv_gets(buf), strcmp(buf,"000")) {
565 fptr = (struct march *) malloc(sizeof(struct march));
568 extract(fptr->march_name,buf,0);
570 while (flist != NULL) {
571 sprintf(buf,"GOTO %s",flist->march_name);
582 printf("%-72s\r","");
587 * routine called by gotofloor() to move to a new room on a new floor
589 void gf_toroom(towhere,mode)
592 int floor_being_left;
594 floor_being_left = curr_floor;
596 if (mode == GF_GOTO) { /* <;G>oto mode */
601 if (mode == GF_SKIP) { /* <;S>kip mode */
603 remove_march("_FLOOR_",floor_being_left);
606 if (mode == GF_ZAP) { /* <;Z>ap mode */
608 remove_march("_FLOOR_",floor_being_left);
609 forget_all_rooms_on(floor_being_left);
617 void gotofloor(towhere,mode)
622 char buf[256],targ[256];
624 if (floorlist[0][0]==0) load_floorlist();
626 for (a=0; a<128; ++a) if (!strucmp(&floorlist[a][0],towhere))
630 for (a=0; a<128; ++a) {
631 if (!struncmp(&floorlist[a][0],towhere,strlen(towhere))) {
638 for (a=0; a<128; ++a)
639 if (pattern(towhere,&floorlist[a][0])>0)
644 printf("No floor '%s'.\n",towhere);
648 for (mptr = march; mptr != NULL; mptr = mptr->next) {
649 if ((mptr->march_floor) == tofloor)
650 gf_toroom(mptr->march_name,mode);
655 sprintf(buf,"LKRA %d",tofloor);
658 if (buf[0]=='1') while (serv_gets(buf), strcmp(buf,"000")) {
659 if ((extract_int(buf,2)==tofloor)&&(strlen(targ)==0))
662 if (strlen(targ)>0) {
663 gf_toroom(targ,mode);
666 printf("There are no rooms on '%s'.\n",&floorlist[tofloor][0]);
672 * forget all rooms on current floor
674 void forget_this_floor() {
676 if (curr_floor == 0) {
677 printf("Can't forget this floor.\n");
681 if (floorlist[0][0]==0) load_floorlist();
682 printf("Are you sure you want to forget all rooms on %s? ",
683 &floorlist[(int)curr_floor][0]);
684 if (yesno()==0) return;
686 gf_toroom("_BASEROOM_",GF_ZAP);
691 * Figure out the physical screen dimensions, if we can
693 void check_screen_dims() {
696 unsigned short height; /* rows */
697 unsigned short width; /* columns */
698 unsigned short xpixels;
699 unsigned short ypixels; /* pixels */
702 if (have_xterm) { /* dynamically size screen if on an xterm */
703 if ( ioctl(0, TIOCGWINSZ, &xwinsz) == 0 ) {
704 if (xwinsz.height) screenheight = (int) xwinsz.height;
705 if (xwinsz.width) screenwidth = (int) xwinsz.width;
713 * set floor mode depending on client, server, and user settings
715 void set_floor_mode() {
716 if (serv_info.serv_ok_floors == 0) {
717 floor_mode = 0; /* Don't use floors if the server */
718 } /* doesn't support them! */
720 if (rc_floor_mode == RC_NO) { /* never use floors */
723 if (rc_floor_mode == RC_YES) { /* always use floors */
726 if (rc_floor_mode == RC_DEFAULT) { /* user choice */
727 floor_mode = ((userflags & US_FLOORS) ? 1 : 0);
733 * Set or change the user's password
740 if (strlen(rc_password) > 0) {
741 strcpy(pass1,rc_password);
742 strcpy(pass2,rc_password);
745 IFNEXPERT formout("changepw");
746 newprompt("Enter a new password: ", pass1, -19);
747 newprompt("Enter it again to confirm: ", pass2, -19);
749 if (!strucmp(pass1,pass2)) {
750 sprintf(buf,"SETP %s",pass1);
753 printf("%s\n",&buf[4]);
757 printf("*** They don't match... try again.\n");
765 * get info about the server we've connected to
767 void get_serv_info() {
770 CtdlInternalGetServInfo(&serv_info);
772 /* be nice and identify ourself to the server */
773 sprintf(buf,"IDEN %d|%d|%d|%s|",
774 SERVER_TYPE,0,REV_LEVEL,
775 (server_is_local ? "local" : CITADEL));
776 locate_host(&buf[strlen(buf)]); /* append to the end */
778 serv_gets(buf); /* we don't care about the result code */
786 * Display list of users currently logged on to the server
788 void who_is_online(int longlist)
790 char buf[128], username[128], roomname[128], fromhost[128], flags[128];
791 char tbuf[128], timestr[128], idlebuf[128], clientsoft[128];
793 time_t idletime, idlehours, idlemins, idlesecs;
799 extract(timestr, tbuf, 1);
800 timenow = atol(timestr);
803 printf("FLG ### User Name Room From host\n");
804 printf("--- --- ------------------------- -------------------- ------------------------\n");
810 while(serv_gets(buf), strcmp(buf,"000"))
812 extract(username,buf,1);
813 extract(roomname,buf,2);
814 extract(fromhost,buf,3);
815 extract(clientsoft, buf, 4);
816 extract(idlebuf, buf,5);
817 extract(flags,buf,7);
820 idletime = timenow - atol(idlebuf);
821 idlehours = idletime / 3600;
822 idlemins = (idletime - (idlehours*3600)) / 60;
823 idlesecs = (idletime - (idlehours*3600) - (idlemins*60) );
824 printf("\nFlags: %-3s Session: %-3d Name: %-25s Room: %s\n",
825 flags, extract_int(buf,0), username, roomname);
826 printf("from <%s> using <%s>, idle %ld:%02ld:%02ld\n",
827 fromhost, clientsoft,
828 idlehours, idlemins, idlesecs);
832 printf("%-3s %-3d %-25s %-20s %-24s\n",
833 flags, extract_int(buf,0), username,
840 void enternew(char *desc, char *buf, int maxlen)
843 sprintf(bbb, "Enter in your new %s: ", desc);
844 newprompt(bbb, buf, maxlen);
855 char aaa[100],bbb[100],ccc[100],eee[100]; /* general purpose variables */
856 char argbuf[32]; /* command line buf */
859 load_command_set(); /* parse the citadel.rc file */
860 sttybbs(SB_SAVE); /* Store the old terminal parameters */
861 sttybbs(SB_NO_INTR); /* Install the new ones */
862 signal(SIGINT,SIG_IGN);
863 signal(SIGQUIT,SIG_IGN);
864 signal(SIGHUP,dropcarr); /* Cleanup gracefully if carrier is dropped */
865 signal(SIGTERM,dropcarr); /* Cleanup gracefully if terminated */
868 printf("Attaching to server...\r");
870 attach_to_server(argc,argv);
876 printf("%s\n",&aaa[4]);
881 printf("%-22s\n%s\n%s\n",serv_info.serv_software,serv_info.serv_humannode,
882 serv_info.serv_bbs_city);
883 screenwidth = 80; /* default screen dimensions */
886 printf(" pause next stop\n");
887 printf(" ctrl-s ctrl-o ctrl-c\n\n");
888 formout("hello"); /* print the opening greeting */
891 /* if we're not the login shell, try auto-login */
896 load_user_info(&aaa[4]);
903 GSTA: termn8=0; newnow=0;
905 if (strlen(rc_username) > 0) {
906 strcpy(fullname,rc_username);
909 newprompt("Enter your name: ",fullname,29);
912 if (!strucmp(fullname,"new")) { /* just in case */
913 printf("Please enter the name you wish to log in with.\n");
916 (!strucmp(fullname,"bbs"))
917 || (!strucmp(fullname,"new"))
918 || (strlen(fullname)==0) );
920 if (!strucmp(fullname,"off")) {
925 /* sign on to the server */
926 sprintf(aaa,"USER %s",fullname);
929 if (aaa[0]!='3') goto NEWUSR;
931 /* password authentication */
932 if (strlen(rc_password)>0) {
933 strcpy(eee,rc_password);
936 newprompt("\rPlease enter your password: ",eee,-19);
939 sprintf(aaa,"PASS %s",eee);
943 load_user_info(&aaa[4]);
947 printf("<< wrong password >>\n");
948 if (strlen(rc_password)>0) logoff(0);
951 NEWUSR: if (strlen(rc_password)==0) {
952 printf("No record. Enter as new user? ");
953 if (yesno()==0) goto GSTA;
956 sprintf(aaa,"NEWU %s",fullname);
963 load_user_info(&aaa[4]);
965 while (set_password() != 0) ;;
971 PWOK: printf("%s\nAccess level: %d (%s)\nUser #%ld / Call #%d\n",
972 fullname,axlevel,axdefs[(int)axlevel],
973 usernum,timescalled);
978 b = extract_int(&aaa[4],0);
979 if (b==1) printf("*** You have a new private message in Mail>\n");
980 if (b>1) printf("*** You have %d new private messages in Mail>\n",b);
982 if ((axlevel>=6) && (extract_int(&aaa[4],2)>0)) {
983 printf("*** Users need validation\n");
986 if (extract_int(&aaa[4],1)>0) {
987 printf("*** Please register.\n");
993 /* Make up some temporary filenames for use in various parts of the
994 * program. Don't mess with these once they've been set, because we
995 * will be unlinking them later on in the program and we don't
996 * want to delete something that we didn't create. */
997 sprintf(temp,"/tmp/citA%d",getpid());
998 sprintf(temp2,"/tmp/citB%d",getpid());
999 sprintf(tempdir,"/tmp/citC%d",getpid());
1001 /* Get screen dimensions. First we go to a default of 80x24. Then
1002 * we try to get the user's actual screen dimensions off the server.
1003 * However, if we're running on an xterm, all this stuff is
1004 * irrelevant because we're going to dynamically size the screen
1005 * during the session.
1012 screenwidth = extract_int(&aaa[4],0);
1013 screenheight = extract_int(&aaa[4],1);
1015 if (getenv("TERM")!=NULL) if (!strcmp(getenv("TERM"),"xterm")) {
1019 check_screen_dims();
1025 /* Enter the lobby */
1026 dotgoto("_BASEROOM_",1);
1028 /* Main loop for the system... user is logged in. */
1032 if (newnow==1) readmsgs(3,1,5);
1033 else readmsgs(1,1,0);
1035 do { /* MAIN LOOP OF PROGRAM */
1036 signal(SIGINT,SIG_IGN);
1037 signal(SIGQUIT,SIG_IGN);
1038 mcmd=getcmd(argbuf);
1041 check_screen_dims();
1044 if (termn8==0) switch(mcmd) {
1045 case 1: formout("help");
1047 case 4: entmsg(0,0);
1049 case 36: entmsg(0,1);
1051 case 46: entmsg(0,2);
1053 case 78: newprompt("What do you want your username to be? ", aaa, 32);
1054 sprintf(bbb, "ENT0 2|0|0|0|%s", aaa);
1057 if (strncmp("200", aaa, 3))
1058 printf("\n%s\n", aaa);
1065 case 47: updatelsa();
1068 case 58: updatelsa();
1069 dotgoto("_MAIL_",1);
1071 case 20: updatels();
1072 case 52: dotgoto(argbuf,0);
1074 case 10: readmsgs(0,1,0);
1076 case 9: readmsgs(3,1,5);
1078 case 13: readmsgs(1,1,0);
1080 case 11: readmsgs(0,(-1),0);
1082 case 12: readmsgs(2,(-1),0);
1084 case 71: readmsgs(3, 1, atoi(argbuf));
1086 case 7: forget(); break;
1087 case 18: subshell(); break;
1088 case 38: updatels();
1090 case 22: killroom(); break;
1091 case 32: userlist(); break;
1092 case 27: invite(); break;
1093 case 28: kickout(); break;
1094 case 23: editthisroom(); break;
1095 case 14: roomdir(); break;
1096 case 33: download(0); break;
1097 case 34: download(1); break;
1098 case 31: download(2); break;
1099 case 43: download(3); break;
1100 case 45: download(4); break;
1101 case 55: download(5); break;
1102 case 39: upload(0); break;
1103 case 40: upload(1); break;
1104 case 42: upload(2); break;
1105 case 44: upload(3); break;
1106 case 57: cli_upload(); break;
1107 case 16: ungoto(); break;
1108 case 24: whoknows(); break;
1109 case 26: validate(); break;
1110 case 29: updatels();
1113 case 30: updatels();
1116 case 48: enterinfo();
1118 case 49: readinfo();
1120 case 72: cli_image_upload("_userpic_");
1122 case 73: cli_image_upload("_roompic_");
1126 sprintf(aaa, "_floorpic_|%d", curr_floor);
1127 cli_image_upload(aaa);
1131 enternew("roomname", aaa, 20);
1132 sprintf(bbb, "RCHG %s", aaa);
1135 if (strncmp("200",aaa, 3))
1136 printf("\n%s\n", aaa);
1139 enternew("hostname", aaa, 25);
1140 sprintf(bbb, "HCHG %s", aaa);
1143 if (strncmp("200",aaa, 3))
1144 printf("\n%s\n", aaa);
1147 enternew("username", aaa, 32);
1148 sprintf(bbb, "UCHG %s", aaa);
1151 if (strncmp("200",aaa, 3))
1152 printf("\n%s\n", aaa);
1160 if (argbuf[0]==0) strcpy(aaa,"?");
1161 display_help(argbuf);
1165 formout("register");
1170 printf("Are you sure (y/n)? ");
1185 case 2: if (server_is_local) {
1186 sttybbs(SB_RESTORE);
1187 sprintf(aaa,"USERNAME=\042%s\042; export USERNAME; exec ./subsystem %ld %d %d",
1189 usernum,screenwidth,axlevel);
1191 sttybbs(SB_NO_INTR);
1194 printf("*** Can't run doors when server is not local.\n");
1221 gotofloor(argbuf,GF_GOTO);
1225 gotofloor(argbuf,GF_SKIP);
1229 forget_this_floor();
1257 knrooms(floor_mode);
1267 misc_server_cmd(argbuf);
1271 edit_system_message(argbuf);
1293 sprintf(bbb, "Page who [%s]? ", last_paged);
1295 sprintf(bbb, "Page who? ");
1296 newprompt(bbb,aaa,30);
1298 strcpy(aaa, last_paged);
1300 newprompt("Message: ",bbb,69);
1301 sprintf(ccc,"SEXP %s|%s",aaa,bbb);
1304 if (!strncmp("200", ccc, 3))
1305 strcpy(last_paged, aaa);
1306 printf("%s\n",&ccc[4]);
1312 TERMN8: printf("%s logged out.\n",fullname);
1313 while (march!=NULL) remove_march(march->march_name,0);
1315 printf("\n\nType 'off' to hang up, or next user...\n");
1316 sprintf(aaa,"LOUT");
1319 if ((mcmd==29)||(mcmd==15)) {