home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / WWIV Mods / WWIVMOD.ZIP / WFCSCRN.MOD < prev    next >
Encoding:
Text File  |  1993-09-07  |  10.7 KB  |  296 lines

  1. ┌──────────────────────────────────────────────────────────────────────┐
  2. │Name:   WFCSCRN.MOD                                                   │
  3. │Author: Odin #1@7664 (IceNET) - C stuff    (My first 4.22 mod!)       │
  4. │        Jim #1@1 (IceNET)     - Ansi                                  │
  5. │Version: 4.22                                                         │
  6. │Files Affected:  BBS.C - hey nice huh?                                │
  7. │Difficulty:  ▓░░░░░░ - A monkey can do this one!                      │
  8. │Description:  Are you tired of the blinking cursor at the top of your │
  9. │              WFC (waiting for call) screen.  Well here is a nice     │
  10. │              record of your BBS while your board is inactive.        │
  11. └──────────────────────────────────────────────────────────────────────┘
  12.  
  13. This mod has an on-screen clock using the computer clock.  It shows the
  14. time in standard form (i.e. 3:30am).  This mod also has a built in screen 
  15. saver.
  16. The status box will move around the screen.  It will  return to its "home" 1/3
  17. of the time. I like it though, so think before killing.  Any colors not
  18. desired may be fixed by using code similar to the one marked /*SELECT COLOR*/
  19. If you wish more colors to be excuded, duplicate the line and change the
  20. numbers.
  21.  
  22. STEP 1:  BACK UP YOUR SOURCES
  23. ------
  24.  
  25. STEP 2:  Load in BBS.C and locate "void getcaller"
  26. ------
  27.  
  28. Before this line, block copy the following void into BBS.C:
  29.  
  30. void wfc_window(int NoScreen)
  31. {
  32.   int am, i, wx, wy, width, len, tmp, clr1, clr2, Imove;
  33.   char otstr[30], d_o_w[3], day;
  34.   double d;
  35.   long hr, min,l, totspace;
  36.   float ftmp;
  37.   if(!NoScreen) {
  38.     run_external1_x("ICE");
  39.     d=timer();
  40.     ftmp=d/3600.0;
  41.     hr=(int) ftmp;
  42.     ftmp=60.0*(ftmp-(float) hr);
  43.     min=(int) ftmp;
  44.     am=1;
  45.     Imove=rand() % 3;                                             /*MOVE*/
  46.     if(hr>11){
  47.       am=0;
  48.       hr=hr-12;
  49.     }
  50.     if(hr==0)
  51.       hr=12;
  52.     wx=12;
  53.     wy=6;
  54.     if(Imove<2) {                                                 /*MOVE*/
  55.       wx=rand() % 24;                                             /*MOVE*/
  56.       wy=rand() % 11;                                             /*MOVE*/
  57.     }                                                             /*MOVE*/
  58.     width=55;
  59.     len=9;
  60.     randomize();
  61.     clr1=rand() % 10;
  62.     clr2=rand() % 10;
  63.     if(clr1==6) clr1=1;    /*Changes red to blue */       /*SELECT COLOR*/
  64.     if(clr2==6) clr2=1;
  65.     ansic(clr1);
  66.     makewindow(wx,wy+2,width,len);
  67.     ansic(clr2);
  68.     makewindow(wx,wy,width,3);
  69.     tmp=(width-strlen(syscfg.systemname))/2;
  70.     movecsr(wx+tmp,wy+1);
  71.     sprintf(otstr,"%s",syscfg.systemname); outs(otstr);
  72.     movecsr(wx+width-8,wy+1);
  73.     sprintf(otstr,"%2ld:%-2.2ld",hr,min);  outs(otstr);
  74.     movecsr(wx+width-3,wy+1);
  75.     if(am) {
  76.       sprintf(otstr,"am");
  77.     }
  78.     else sprintf(otstr,"pm");
  79.     outs(otstr);
  80.     day=dow();
  81.     if(day==0) sprintf(d_o_w,"Sun");
  82.     if(day==1) sprintf(d_o_w,"Mon");
  83.     if(day==2) sprintf(d_o_w,"Tue");
  84.     if(day==3) sprintf(d_o_w,"Wed");
  85.     if(day==4) sprintf(d_o_w,"Thu");
  86.     if(day==5) sprintf(d_o_w,"Fri");
  87.     if(day==6) sprintf(d_o_w,"Sat");
  88.     movecsr(wx+1,wy+1);
  89.     sprintf(otstr,"%s %s",d_o_w,status.date1); outs(otstr);
  90.     ansic(clr1);
  91.     movecsr(wx+1,wy+3);
  92.     sprintf(otstr,"Calls today :       %4u",status.callstoday);
  93.     outs(otstr);
  94.     movecsr(wx+1,wy+4);
  95.     sprintf(otstr,"Actvity     :      %5.2f%%"
  96.             ,((float) status.activetoday)/14.4);
  97.     outs(otstr);
  98.     movecsr(wx+1,wy+5);
  99.     sprintf(otstr,"Mail Waiting:       %4u",fwaiting);  outs(otstr);
  100.     movecsr(wx+1,wy+6);
  101.     sprintf(otstr,"Uploads     :       %4u",status.uptoday);
  102.     outs(otstr);
  103.     movecsr(wx+1,wy+7);
  104.     sprintf(otstr,"Posts Today :       %4u",status.msgposttoday);
  105.     outs(otstr);
  106.     movecsr(wx+1,wy+8);
  107.     sprintf(otstr,"Total Users :       %4u",status.users);
  108.     outs(otstr);
  109.     movecsr(wx+1,wy+9);
  110.     sprintf(otstr,"Total Calls :      %5ld",status.callernum1);
  111.     outs(otstr);
  112.     movecsr(wx+30,wy+4);
  113.     sprintf(otstr,"Minutes     :      %4u",status.activetoday);
  114.     outs(otstr);
  115.     movecsr(wx+30,wy+5);
  116.     sprintf(otstr,"Max Users   :      %4u",syscfg.maxusers);
  117.     outs(otstr);
  118.     movecsr(wx+30,wy+6);
  119.     sprintf(otstr,"Com Port    :        %2u",syscfg.primaryport);
  120.     outs(otstr);
  121.     movecsr(wx+30,wy+7);
  122.     sprintf(otstr,"NETxx Ver   :      %4u",status.net_version);
  123.     outs(otstr);
  124.     movecsr(wx+30,wy+8);
  125.     sprintf(otstr,"WWIV Ver    :      %4u",status.wwiv_version);
  126.     outs(otstr);
  127.     movecsr(wx+30,wy+9);
  128.     sprintf(otstr,"WWIV Reg. # :     %5ld",syscfg.wwiv_reg_number);
  129.     outs(otstr);
  130.     movecsr(wx+30,wy+3);
  131.     i=3;
  132.     l=(long) freek(3);  totspace=l;
  133.     while ((l>0) && ((i+'@')<=cdir[0])) {
  134.       i++;
  135.       if ((i+'@')<=cdir[0])  {
  136.         l=(long) freek(i);
  137.         totspace+=l;
  138.       }
  139.     }
  140.     sprintf(otstr,"HD Space    : %8ldk",totspace);
  141.     outs(otstr);
  142.     ansic(0);
  143.     movecsr(0,22);
  144.   }
  145. }
  146.  
  147. STEP 3:  All the following changes/additions occur in void getcaller
  148. ------
  149. ┌──────────────────────┐
  150. │         Legend       │
  151. │! - this line changed │
  152. │+ - add this line     │
  153. │= - this there before │
  154. └──────────────────────┘
  155. -In the declaration section, make the following changes:
  156.  
  157. !  int i,i1,i2,i3,any,wfc_on, NoScreen;
  158. !  double d,d1,tstamp,tmp;
  159.  
  160. -Search for "srand((unsigned int)d);".  Then change accordingly.
  161.  
  162. =  srand((unsigned int)d);
  163. +  wfc_window(NoScreen);
  164. +  tstamp=timer();  wfc_on=1;
  165. =  do {
  166.  
  167. -Search for "attempt_callout();".  Then change accordingly.
  168.  
  169. =    if ((!any) && ((rand() % 8000)==0) && (net_sysnum) &&
  170. =                   (ok_modem_stuff)) {
  171. =      attempt_callout();
  172. +      wfc_on=0;
  173. =      any=1;
  174.  
  175. -In the switch section, add these lines
  176.  
  177. +       case '=':
  178. +         if (NoScreen) NoScreen=0;
  179. +         else NoScreen=1;
  180. +         break;
  181.  
  182. -Search for "if ((comhit())".  Change accordingly.
  183. =      }
  184. =      okskey=0;
  185. +      wfc_on=0;
  186. =    }
  187. =   if ((comhit()) && (ok_modem_stuff) && (!lokb)) {
  188.       any=1;
  189.  
  190. -Search for "giveup".  Change accordingly.
  191.  
  192. =        giveup_timeslice();
  193. =    }
  194. +    tmp=timer()-tstamp;
  195. +    if((!wfc_on) || (60<=tmp) || (0>tmp)) {
  196. +       tstamp=timer();
  197. +       wfc_on=1;
  198. +       wfc_window(NoScreen);  }
  199. =  } while ((!incom) && (!lokb) && (!endday));
  200.  
  201.  
  202. STEP 4:  Re-compile using TCC or BCC.
  203. ------
  204.  
  205. STEP 5:  Place ICE.COM into your main BBS directory.  A copy is at the end
  206. ------   of this mod.
  207.  
  208.  
  209. STEP 6:  Copy BBS.EXE, RETURN.EXE, and INIT.EXE into your main BBS directory.
  210. ------
  211.  
  212.  
  213. That's it.
  214.  
  215. DISCLAIMER:  Well, if your hard drive crashes, your BBS decides to nuke all
  216. ----------   the accounts, your sister runs away with the milkman, or you
  217.              just screwed up, DON'T BLAME ME.  This method worked great for
  218.              me.
  219.  
  220. The following is ICE.COM uuencoded.  Use UUDECODE to return it to its original
  221. state and place it into your main BBS directory.
  222.  
  223. section 1 of uuencode 5.13 of file ice.com    by R.E.M.
  224.  
  225. begin 644 ice.com
  226. M_+T@`8MN`(NF`@"+G@0`M$K-(:$L`(F&&@"+G@``_^,P`8H41@K2=`:T`LTA
  227. MZ_/#P`D6#`(!&`P9#1H.&P^?Z%)0Z)'H4!ZX1-=0N``"```;6S0P;1M;,DH;
  228. M6S([,4@;6S,[,4@;6S0[,4@;6S4[,4@;6S8[,4@;6S<[,4@;6SE#&ULP.S%M
  229. ML;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&Q
  230. ML;&QL;&QL;&QL;&QL;&QL;$;6S@[,4@;6SE#L;&QL;&QL;&QL;&QL;&QL;&Q
  231. ML;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;$;
  232. M6S,V;;&Q&ULY.S%(&ULY0QM;,S=ML;&QL;$;6S`[,S5ML;&QL;&QL;&QL;&Q
  233. ML;&QL;&QL;&QL;&QL;&QL;$;6W,*#0`;6W6QL;&QL;&QL;&QL;&QL;&QL;&Q
  234. ML;&QL;&QL1M;,3LS-VVQL1M;,S9ML;$;6S$P.S%(&ULY0QM;,S=ML;&QL;$;
  235. M6S`[,S5ML;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&Q
  236. ML;&QL;&QL;&QL;&QL;&QL1M;,3LS-VVQL1M;,S9ML;$;6S$Q.S%(&ULY0QM;
  237. M,S=ML;&QL;$;6S`[,S5ML;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&Q
  238. ML;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL1M;,3LS-VVQL1M;,S9ML;$;6S$R
  239. M.S%(&UMS"@T`&UMU&ULY0QM;,S=ML;&QL;$;6S`[,S5ML;&QL;&QL;&QL;&Q
  240. ML;&QL;&QL;&QL;&Q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
  271. ML;&Q&ULQ.S,W;;&Q&ULS-FVQL1M;,C$[,4@;6SE#&ULS-VVQL;&QL;&QL;&Q
  272. ML;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&Q
  273. ML;&QL;&QL1M;,S9ML;$*#0`;6S(R.S%(&ULQ,4.QL;&QL;&QL;&QL;&QL;&Q
  274. ML;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&QL;&Q
  275. ML1M;,C,[,4@;6S(T.S%(&ULR-3LQ2!M;,&T;6S(U-40*#0"-MB``N"(!_]"-
  276. MMB(!N"(!_]"-MB("N"(!_]"-MB0#N"(!_]"-MB8$N"(!_]"-MB,%N"(!_]"-
  277. ?MB4&N"(!_]"-MB<'N"(!_]"-MB0(N"(!_]"X`$S-(4S-
  278. `
  279. end
  280. sum -r/size 21868/3232 section (from "begin" to "end")
  281. sum -r/size 28227/2326 entire input file
  282.  
  283.  
  284.  
  285.  
  286. A special thanks to Jim #1@1 (IceNET) for the ANSI background and for the
  287. continual ideas and support.  What started as a little mod for me turned
  288. into a very nice functional mod that none of your users will appreciate, but
  289. I think you will.  If you have any questions, feel free to write me and I
  290. will get back to you.  It has been fun.....
  291.  
  292. Odin #1   IceNET@7664
  293.  
  294.  
  295.  
  296.