1[2DAWG14.MOD1] 0Add network and subname to prompt Dawg #1 @13498 Sat Feb 20 17:37:44 1993 ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º MOD :DAWG14.MOD - Show network and subname when reading posts. º º DATE :02/18/93 º º USAGE :WWIV 4.22 º º VERSION :1.15 º º Descrip.:This will optionally show the user the network and sub name º º while reading message bases. º º Diff. :3 (on a scale of 1-10, 1 being easy) º º Author :6Dawg0 116@134722/116@1134980 º º BBS :6Thunder2world0 º º Thanx to:4Fish7Bone0 of 7Star4Base0 4Fish7Bone0 (3478 net/13454 link) º º for beta testing this mod and for his countless suggestions º º some of which were implemented. º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ Okay another 7Fish4Bone0 inspired mod. He has 80+ subs on his board and lately he decided to actually read them. With a clear screen mod in, it was sometimes difficult to remember which sub he was on. He asked if I could put a mod in to show the name. I've seen them before, but I personally didn't like them (don't really know why). So I decided I would put it in, but it would have to be toggleable in the defaults since *I* didn't want it showing up on my screen. Then greedy person that he is, after I got it working, he then wanted it to also show the network that the sub was on. Since I had removed it from the header of the message, I thought I'd shove it in too. Well on with the mod. :) Step 1: ------- BACK UP YOUR SOURCE CODE!!!!!!!! If something goes wrong or you don't like the mod, you have something to go back to. Step 2: ------- Load up VARDEC.H and add the following line to the userrec.sysstatus part of the code: /* userrec.sysstatus */ #define sysstatus_ansi 0x0001 #define sysstatus_color 0x0002 #define sysstatus_music 0x0004 #define sysstatus_pause_on_page 0x0008 #define sysstatus_expert 0x0010 #define sysstatus_smw 0x0020 #define sysstatus_full_screen 0x0040 #define sysstatus_nscan_file_system 0x0080 #define sysstatus_funky_colors 0x0100 #define sysstatus_clr_scrn 0x0200 #define sysstatus_upper_ASCII 0x0400 #define sysstatus_two 0x0800 #define sysstatus_three 0x1000 #define sysstatus_four 0x2000 #define sysstatus_subname 0x4000 /*ADD ME*/ #define sysstatus_fancy 0x8000 Your will likely look different than mine. I added the one for fancy ansi, and taking Tolkien's suggestion put some fillers in and worked backwards. You can make it any unused one you wish. Step 3: ------- Okay, now we save VARDEC.H and head for DEFAULTS.C. I've got several other options in defaults, so things *might* look a bit different in your copy of source. I externalize all my mod strings into their own file and encourage you to do the same. However, for practicality, any string that Wayne didn't include with the source will be put in normally, and left up to you if you wish to externalize it. Go down to void print_cur_stat(void), and add the following lines: if (okansi()) { pl(get_string(397)); outstr(get_string(398)); npr("%s\r\n", ((thisuser.defed) && (thisuser.defed<=numed))? editors[thisuser.defed-1].description:get_string(5)); outstr(get_string(399)); npr("%s\r\n", (thisuser.sysstatus & sysstatus_funky_colors)?str_yes:str_no); } outstr(get_string(400)); npr("%d\r\n",thisuser.optional_val); /*ADD the following lines*/ npr(("E. Show name/network : %s"), (thisuser.sysstatus & sysstatus_subname)?get_string(389):get_string(390)); nl(); /*to here*/ Step 4: ------- Further down in DEFAULTS.C we get to make more changes. Again, I have a few other modifications to my defaults section so you don't necessarily have to use the same letter I chose, etc. Go down to void defaults(void), and change the two ONEK lines. You might also want to edit strings 477 & 478 in bbs.str to show the new options: done=0; print_cur_stat(); do { tleft(1); if (hangup) return; nl(); helpl=4; if (okansi()) { prt(2,get_string(477)); ch=onek("Q?123456789ABCDEW"); /*Change me, add the letter you wish*/ } else { /*to use,I use E for this*/ prt(2,get_string(478)); ch=onek("Q?1234567BDEW"); /*This one too*/ } switch(ch) { case 'Q': Step 5: ------- Further down in the same void we get to make more changes. Make sure you are using the same letter in all of these places (I use 'E'). You need to add the entire case in: case 'B': optional_lines(); break; /* ADD FROM HERE*/ case 'E': if (thisuser.sysstatus & sysstatus_subname) thisuser.sysstatus ^= sysstatus_subname; nl(); prt(5,"Show subname/network? "); if (yn()) thisuser.sysstatus |= sysstatus_subname; break; /* TO HERE*/ case 'W': enter_regnum(); break; Step 6: ------- Okay, now we save DEFAULTS.C, and load up MSGBASE1.C. Our changes take place in void scan. First off you need to add a variable at the top: void scan(int msgnum, int optype, int *nextsub) { char s[81],s1[81],s2[81],*b,*ss1,s8[81]; /* ADD s8[81]*/ int i,i1,i2,done,quit,abort,next,val,realexpress; slrec ss; Okay a bit further down make the following additions: do { tleft(1); if (xsubs[curlsub].num_nets) set_net_num(xsubs[curlsub].nets[0].net_num); else set_net_num(0); switch(optype) { case 0: /* Read Prompt */ /*ADD FROM HERE */ if (xsubs[curlsub].num_nets) { set_net_num(xsubs[curlsub].nets[0].net_num); sprintf(s8,"1Net 2: 7[6%s7]0\r\n",net_name); } else { set_net_num(0); sprintf(s8,"1Net 2: 7[6Local7]0\r\n"); } sprintf(s1,"1Sub 2: 7[6%s7]0\r\n",subboards[curlsub].name); /*DOWN TO HERE, YOU CAN ALSO COLOR THE NEXT LINE IF YOU WISH*/ sprintf(s,"1%s2:7(11-%u6,^1%u7)1,? 2:0",get_string(678), nummsgs,msgnum); nl(); if (express) { s[0]=0; nl(); nl(); } else { /* ADD THE NEXT GROUP OF LINES*/ if (thisuser.sysstatus & sysstatus_subname) { prt(1,s8); prt(1,s1); } /*DOWN TO HERE*/ prt(2,s); helpl=16; input(s,3); while (s[0]==32) { strcpy(s1,&(s[1])); strcpy(s,s1); } } optype=0; i=atoi(s); Okay now save MSGBASE1.C and recompile. A full one unfortunately, but just think of how much fun you can have.... If you have any problems with this mod, feel free to contact me. My net address is 1@3472, and my link address is 1@13498. I will do what I can to help. Oh and one last thing, if anyone does actually use this mod, I'd appreciate a short note through the net or link telling me that. Thanks, 6Dawg0