home *** CD-ROM | disk | FTP | other *** search
- Nicolas Leblanc #2 @20302
- Sun Jun 18 23:41:12 1995
- ┌┬─── ── ─ ─ ── ───────────────────────────────────────────────────┬─ ∙∙
- ││ Alternative Worlds Presents │
- └┼─────────────────────────────────────────────────────────────────────┐
- ││ Mod Name » FMD-37a.MOD │∙
- ││ Difficulty » █▒▒▒▒▒▒▒▒▒▒ (1/10) │:
- ││ WWIV Version » 4.24 ││
- ││ Date Affected » 06/01/95 ││
- :│ Files Affected » MMENU.C / MISCCMD.C ││
- ∙│ Description » New System Informations For WWIV ││
- └─────────────────────────────────────────────────────────────────────┼┐
- │ A French Mod Division Release - (C) 1995 FMD Software ││
- ∙∙ ─┴─────────────────────────────────────────────────── ── ─ ─ ── ───└┘
-
-
- ┌┬══════════════════┐
- ││ Long Description ││
- └══════════════════┴┘
-
- If you ever saw the Vision-X System information, well, this is it!
- For WWIV!
-
- Revision A:
-
- - Updated for WWIV v4.24
-
- ┌┬═══════┐
- ││ Tests ││
- └═══════┴┘
-
- This modification has been tested on a virgin WWIV v4.24 source using
- Borland C++ v4.5
-
- ──────────────────────────────────────────────────────────────────────────────
- Legend
- ╔═══╤══════════════════┐
- │ + │ Add This Line │
- │ - │ Delete This Line │
- │ * │ Modify This Line │
- │ = │ Existing Line │
- └═══╧══════════════════╝
- ───[Step 1]────────────────────────────────────────────────────────────────────
-
- Add the following functions in at the end of MISCCMD.C:
-
- void sysinfo_zlog(void)
- {
- zlogrec z;
- char s[81];
- int abort,f,i,i1,c1,c2,c3;
-
-
- c1=thisuser.colors[4];
- c2=thisuser.colors[6];
- c3=thisuser.colors[8];
- thisuser.colors[4]=8;
- thisuser.colors[6]=13;
- thisuser.colors[8]=1;
- sprintf(s,"%sZLOG.DAT",syscfg.datadir);
- f=sh_open1(s,O_RDONLY | O_BINARY);
- if (f<0)
- return;
- i=0;
- abort=0;
- sh_read(f,(void *)&z,sizeof(zlogrec));
- while ((i<3) && (!abort) && (!hangup) && (z.date[0]!=0)) {
- if (z.calls)
- i1=z.active/z.calls;
- else
- i1=0;
- sprintf(s,"3%s 7%4d 9%4d 4%3d 8%3d 3%3d 7%3d 6%3d 3%3d",
- z.date,z.calls,z.active,z.posts,z.email,z.fback,z.up,10*z.active/144,i1);
- pla(s,&abort);
- ++i;
- if (i<3) {
- sh_lseek(f,((long) i) * sizeof(zlogrec),SEEK_SET);
- sh_read(f,(void *)&z,sizeof(zlogrec));
- }
- }
- sh_close(f);
- thisuser.colors[4]=c1;
- thisuser.colors[6]=c2;
- thisuser.colors[8]=c3;
- }
-
-
- void sysinfo(void)
- {
- int c1;
-
- c1=thisuser.colors[8];
- thisuser.colors[8]=8;
- outchr(12);
- litebar3("[ %s System Status ]", wwiv_version);
- nl();
- square(1,4,47,11,8,0);
- goxy(5,4);
- npr("7[9 Main Status 7]");
- goxy(4,5);
- npr("7Board Name...: 3%-26.26s",syscfg.systemname);
- goxy(4,6);
- npr("7SysOps Name..: 3%-26.26s",syscfg.sysopname);
- goxy(4,7);
- npr("7Total Users..: 3%d",status.users);
- goxy(4,8);
- npr("7Total Callers: 3%d",status.callernum1);
- goxy(4,9);
- npr("7Calls Today..: 3%d",status.callstoday);
- goxy(4,10);
- /* npr("7Calls per Day: 3%.2f",(status.callernum1/(atof(status.days)))); */
- /* Warning: Enable the previous line ONLY if using FMD-02.MOD */
- square(49,4,78,11,8,0);
- goxy(52,5);
- npr("7Uploads Today.: 3%d",status.uptoday);
- goxy(52,6);
- npr("7Messages Today: 3%d",status.msgposttoday);
- goxy(52,7);
- npr("7System PCR....: 3%.3f",syscfg.post_call_ratio);
- goxy(52,8);
- npr("7Comm Port.....: 3%d",syscfg.primaryport);
- goxy(1,13);
- pl("7Date Calls Active Posts Email Fback U/L %Act T/user");
- pl("8──────────────────────────────────────────────────────────────────────────────");
- thisuser.colors[8]=c1;
- sysinfo_zlog();
- goxy(1,20);
- if ((sysstatus_expert & thisuser.sysstatus)==0)
- pausescr();
- }
-
- ───[Step 2]────────────────────────────────────────────────────────────────────
-
- Add the following functions at the end of COM.C (You might already have them):
-
-
- void litebar3(char *fmt, ...)
- {
- int i;
- va_list ap;
- char s[512], s1[512], s2[250];
-
- va_start(ap, fmt);
- vsprintf(s, fmt, ap);
- va_end(ap);
-
- i=(74-strlen(s))/2;
- if (okansi())
- {
- sprintf(s1,"%s%s%s",charstr(i,' '),stripcolors(s),charstr(i,' '));
- npr("\x1B[0;1;36m%s\r\n",charstr(strlen(s1)+4,'▄'));
- npr("\x1B[0;30;46m ∙%s∙ \x1B[40m\r\n",s1);
- npr("\x1B[0;1;30m%s\r\n",charstr(strlen(s1)+4,'▀'));
- } else {
- npr("%s%s\r\n", charstr(i,' '), s);
- }
- }
-
- void prlocate1(int x, int y, int c1, int c2, char *fmt, ...)
- /* Output a fast string at a given position */
- {
- va_list ap;
- char s[512];
-
- va_start(ap, fmt);
- vsprintf(s, fmt, ap);
- va_end(ap);
- goxy(x, y);
- setc(c2*16+c1);
- npr(s);
- }
-
- void square(int x , int y , int x1 , int y1, int c1, int c2)
- {
- int i;
-
- if (y1>25)
- y1= 25;
- prlocate1(x, y, c1, c2, "┌%s┐", charstr((x1-x)-1, '─'));
- for (i= y+1; i<y1; ++i) {
- prlocate1(x, i, c1, c2, "└%s┘", charstr((x1-x)-1, '─'));
- prlocate1(x, i, c1, c2, "│%s│", charstr((x1-x)-1, ' '));
- }
- prlocate1(x, y1, c1, c2, "└%s┘", charstr((x1-x)-1, '─'));
- }
-
- ───[Step 3]────────────────────────────────────────────────────────────────────
-
- Load MMENU.C and do the following change to void mainmenu.
-
- = case 'H':
- = hop_sub();
- = break;
- = case 'I':
- = nl();
- = if (menu_on()) {
- = printmenu(328);
- = getkey();
- = rip_pcb();
- = }
- = npr("%s (%s)\r\n",wwiv_version, wwiv_date);
- = nl();
- = existprint(get_string(1033));
- = existprint(get_string(1034));
- + pausescr();
- + sysinfo();
- = break;
- = case 'J':
- = if (okconf(&thisuser))
-
- ───[Step 4]────────────────────────────────────────────────────────────────────
-
- That's it. Do a MAKE FCNS and recompile the entire system.
-
- French Proverb: Il n'est point de sot métiers.
-
- For comments, bug report and suggestion, e-mail at the following address:
-
- Nicolas LeBlanc 2@20302.WWIVnet (aka Spotnick)
- -> spotnick@gamemaster.qc.ca
- Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
- -> martin.bourdages@radio.magicnet.com
-
- => French Mod Division Support Sub <=
- SubType: FMD
- Host: @20302 (WWIVnet)
- Scan sublist for other networks
-
- Read PRODUCTS.FMD for the full list of our support systems.
-
- ───[EOF]──────────────────────────────────────────────────────────────────────
-