MODNET 9/10 -- A Mail Menu Yet another of those mods that were simply too big to squeeze into one of the other files (I make 14k my break-point for deciding these things). -=>mtb<=- ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Suicidal Maniac #1 @6865 Thu May 10 17:52:07 1990 ± -MLMNU12.MOD- ± ± ± ± The New and Improved Mail Menu Mod ± Hello and welcome to yet another chocolatey mod. I had been using Adam Rogers's Mail Menu Mod since I first registered WWIV and have been happily satisfied with this product, but it still had room for some pretty nice improvements. I left the "A"utomessage on the Main menu, before I got rid of the auto message, so you will not see it on this menu. What I have added is some features that I thought made sense to have in the message section. First, I made it so that users could select their full-screen editor from the message menu. Making them go to a seperate menu to change that made me think of RBBS, sorry if you just ate. So you will notice that option near the bottom. After that, I thought "Well, why not go ahead and throw in the other configurations?" Oh boy, don't get me started. So, now we have on our message menu, the ability to forward your mail (Why not? That's where you send it!), the ability to configure your newscan, and the ability to upload a message. The mod did not let a user enter more than one keystroke at the menu prompt. I fixed this problem. It was a very small flaw in the programming, and one no longer remains. I saw this nice little mod that a sysop put up on the Modnet called the CASE#.MOD. It didn't work because he forgot a break; statement, but I found that one real quick and implemented it in this. I have also put in a nice little addition for you sysops, BOARDEDIT from the message menu. Ahh, I knew you guys were wondering about that! As you look through this mod you will see a lot of changes that were made from the original mod. I added a little more color to the Captain's prompt and took a lot of the blocky look out of it that it had. Anyway, enough with discussing the mods I made, you can just look at them... On with the show... ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± STEP UNO Load up BBS.C in your Turbo C editor. Hit ^QF and search for "mainmenu" without the quotes. Now, go up to the line just before void mainmenu(); and block read this puppy in. (If you don't know how to block read, I suggest you learn it, because this would be a bitch to type in.) void messmenu() { char *s,*num,s1[81],s2[81]; int abort; int i,done1; long l; if ((sysstatus_expert & thisuser.sysstatus)==0) printfile("MESSMENU"); s1[0]=0; nl(); nl(); tleft(1); prt(7,"Time Left"); prt(1,": "); ansic(3); print("",ctim(nsl()),""); s1[0]=0; if (usub[cursub].subnum==-1) { cursub=0; if (usub[cursub].subnum==-1) { strcpy(s1,"[] No Subs Available :"); } } if (s1[0]==0) { prt(4,"{"); if (subboards[usub[cursub].subnum].type) prt(4,"Network"); else prt(4,"Local"); prt(4," Message Area"); prt(4,"}"); nl(); prt(7,"[("); prt(3,usub[cursub].keys); prt(7,")*("); prt(1,subboards[usub[cursub].subnum].name); prt(7,")]"); prt(0,": "); } helpl=1; s=mmkey(0); /* Fixes the one key Thingy */ helpl=0; if (s[0]) for (i=0; i<32; i++) if (strcmp(usub[i].keys,s)==0) cursub=i; sysopchar(s); if ((strcmp(s,"BOARDEDIT")==0) && (so())) { sysoplog("@ Ran Boardedit"); boardedit(); } if ((strcmp(s,"LOAD")==0) && (so())) { /* Of Course! */ nl(); prt(2,"Filename? "); input(s1,50); if (s1[0]) { nl(); prt(5,"Allow editing? "); if (yn()) { nl(); load_workspace(s1,0); } else { nl(); load_workspace(s1,1); } } } if ((strcmp(s,"MAILR")==0) && (so())) /* Another one */ if (checkpw()) { sysoplog("@ Read all mail"); mailr(); } /*---------------Non-Sysop-Commands-------------------*/ if (strcmp(s,"QSCAN")==0) { nl(); prt(5,"Clear Q-Scan pointers? "); if (yn()) { for (i=0; i<33; i++) thisuser.qscnptr[i]=status.qscanptr-1L; nl(); pl("Q-Scan pointers cleared."); nl(); } } if (strcmp(s,"NET")==0) /* Definetly needed to be added */ print_net_listing(); if (strcmp(s,"/C")==0) { /* You may want to */ thisuser.sysstatus ^= sysstatus_funky_colors; /* comment this */ nl(); /* command out if */ if (thisuser.sysstatus & sysstatus_funky_colors) /* you are using */ pl("Extra colors enabled."); /* version 4.11 */ else pl("Extra colors turned OFF."); nl(); } if ((s[1]==0) && (s[0]!=0)) { switch(s[0]) { case '?': if ((sysstatus_expert & thisuser.sysstatus)) printfile("MESSMENU"); /* Prints the menu */ break; case 'Q': curmes=0; /* Returns to main */ break; case 'O': helpl=12; nl(); nl(); prt(5,"Hit the road? "); if (yn()) { outchr(12); print("Time on = ",ctim(timer()-timeon),""); printfile("LOGOFF"); /* Now you can create LOGOFF.ANS and it will */ curmes=0; /* print correctly */ hangup=1; } break; case '+': case '>': if (usub[cursub+1].subnum>=0) ++cursub; else cursub=0; break; case '-': case '<': if (cursub>0) --cursub; else { while (usub[cursub+1].subnum>=0) ++cursub; } break; case 'E': send_email(); break; case 'C': strcpy(irt,"Feedback."); email(1,0,0,0); break; case 'K': helpl=8; kill_old_email(); break; case 'M': if (thisuser.waiting>0) { readmail(); } else { nl(); pl("Moron + Typewriter = M.");nl();nl(); /* Just to make 'em laugh */ pl("You have no mail!"); nl(); } break; case 'N': express=0; expressabort=0; nscan(0); break; case 'P': irt[0]=0; if (usub[0].subnum!=-1) post(); break; case 'F': i=0; express=0; expressabort=0; qscan(cursub,&i); break; /* case 'G': If you have the nl(); Quoter & Joker full_external("Q&J",0,1); in your main BBS break; */ /* Dir, uncomment */ case 'R': /* this command. */ helpl=15; remove_post(); break; case 'S': express=0; expressabort=0; scan2(); break; case 'U': list_users(); break; case 'X': thisuser.sysstatus ^= sysstatus_expert; break; case '*': sublist(); break; case '#': do { done1=0; nl(); prt(2,"Which sub would you like to go to? (?=list) "); num=mmkey(0); if (strcmp(num,"?")==0) { sublist(); } for (i=0; i<32; i++) if (strcmp(usub[i].keys,num)==0) { cursub=i; done1=1; } } while ((!hangup) && (!done1)); break; case '!': /* Added - SM */ upload_post(); break; case '=': /* Added - SM */ config_qscan(); break; case ':': modify_mailbox(); /* Added - SM */ break; case '%': if (okansi()) /* New in v1.2 */ select_editor(); /* Added - SM */ break; case 'T': /* New in v1.2 */ /* Jumps to Transfer Section */ curmes=0 curdloads=1 break; case 'Z': express=1; expressabort=0; l=thisuser.sysstatus; if (l & sysstatus_pause_on_page) thisuser.sysstatus ^= sysstatus_pause_on_page; nscan(0); express=0; expressabort=0; thisuser.sysstatus=l; break; } } helpl=0; } ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± STEP DOS Still in BBS.C, go down to void mainmenu(). Remove case 'M': and add this one: case 'M': curmes=1; break; ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± STEP TRES Now that you have the message system ready to run, go through and delete all of the message commands from the main menu. These should include: case 'E': case '+': case '-': case '>': case '<': case 'K': case 'P': case 'N': case 'R': case 'S': case '*': case 'Z': ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± STEP CUATRO Ok, now we have to tell the BBS that this little mod is there, so still in BBS.C search main_menu_label and make the following changes: main_menu_label: while (!hangup) { if (curdloads) dlmainmenu(); else if (curmes) /* ADD */ messmenu(); /* ADD */ else if (curdloads) /* ADD */ /* New in v1.2 */ dlmainmenu(); /* ADD */ /* New in v1.2 */ else mainmenu(); ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± STEP CINCO Now, load up VARS.H and search for this line: int cursub,curdir,curdloads,msgreadlogon; Now let's add curmes in there so it looks like this: int cursub,curdir,curdloads,curmes,msgreadlogon; There, now it is fully operable and you need a menu. Go to the next step. ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± STEP SEIS Now, change your main menu to have only the commands that are left there showing. Now we have to create a message menu. I will include that in the package since everyone will have the same options. Now, to make life easier for you, I have changed the menu command in the code to print a file, so you will not have to worry about appending this to your menus.msg. Here's MESSMENU.MSG ... --- Message Menu --- C)omment to Sysop E)mail another user X)pert Mode K)ill old Email U)ser List M)Read your mail S)can Message Base P)ost a message N)ew-scan (Global) R)emove a message F)ast scan sub *)List of accessible subs Z)ippy New Scan T)ransfer Section + or >)Up one sub #)Change Sub - or <)Down one sub Also to select a sub enter that sub's number at the prompt. !)Upload a post =)Configure your N-scan //QSCAN - Clear Qscan Pointers :)Forward/Unforward Mailbox //NET - WWIVnet BBS Listing %)Select Fullscreen Editor Q)uit to Main Menu G)et a Quote & Joke O)Log Off - /O for quick! Now, it is up to you to remember the sysop commands, I mean there are only 3. I just figured there wouldn't be any real use in adding a sysop menu for just those commands. Now rebuild all and you are set! Thanks a lot to Adam Rogers for his excellent mod, without it this one would not even be here. Stay tuned for my next project. A sysop menu! Dirty Bird's Nest @6865 - The World's First and Only Chocolate BBS 618-397-7687 - Extensive WWIV Support - 300/1200/2400/4800/9600 HST 150 MB - Complete Cosmetic Makeover of WWIV DISCLAIMER: If this mod breaks your computer, you own both parts. If this mod causes loss of appetite, severe itching, drowsiness, or convulsions, stop use consult a physician before using again. If you use this, tell 1@6865 that you do! Revision changes for v1.2 - Well, I noticed a couple mistakes I had made on my programming up there, so I have fixed them. First of all, I told you to create a file called MESSMENU.MSG, but I didn't tell the command to print that file, it was still looking for menu #16. Well, it has been fixed. I also found a mistake I had made with the full-screen editors, non-ansi users could access them and they would just get stuck there and would have to drop carrier to get off. Now, it makes sure that the user can support ansi, if they can't they cannot access the editors. I also added a nice feature - a jump to the transfer section. I will put in the next revision the mod to get the xfer section to jump to the message section. I have also added a mod that when a user hits G, it will run the Quoter and Joker, so if you have the Quoter and Joker in your main BBS directory, remove the comment identifiers from the case 'G': command, if you do not have the Quoter and Joker just remove it from the menu. Once again, I hope you like the mod and make use of it. Suicidal Maniac !@6865