home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / ALLMODS.ZIP / FMD-11A.ZIP / FMD-11A.MOD < prev    next >
Encoding:
Text File  |  1995-06-01  |  7.0 KB  |  179 lines

  1.  
  2.    ┌┬─── ──  ─   ─  ── ───────────────────────────────────────────────────┬─ ∙∙
  3.    ││                    Alternative Worlds Presents                      │
  4.    └┼─────────────────────────────────────────────────────────────────────┐
  5.    ││ Mod Name       » FMD-11a.MOD                                        │∙
  6.    ││ Difficulty     » █▒▒▒▒▒▒▒▒▒▒ (1/10)                                 │:
  7.    ││ WWIV Version   » 4.24                                               ││
  8.    ││ Date Affected  » 06/01/95                                           ││
  9.    :│ Files Affected » MISCCMD.C / MMENU.C / COM.C                        ││
  10.    ∙│ Description    » Numerical User Listing With More Informations      ││
  11.     └─────────────────────────────────────────────────────────────────────┼┐
  12.     │       A French Mod Division Release - (C) 1995 FMD Software         ││
  13. ∙∙ ─┴─────────────────────────────────────────────────── ──  ─   ─  ── ───└┘
  14.  
  15.  ┌┬══════════════════┐
  16.  ││ Long Description ││
  17.   └══════════════════┴┘
  18.  
  19.   This is currently something like Vision-X user listing, the modification
  20. will display a list of ALL your users (not only the one who has acces to the
  21. current sub) and put them in numerical order than the alphabetic order. This
  22. is useful if like us, you keep your Co-SysOp and friends to low user numbers
  23. and to see who's new on the system if you don't purge too often your users.
  24.  
  25.   Here is a snap shot of what it will look like on your system:
  26.  
  27. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  28.    Alias/User Handle          Main Level       User Note           Area Code 
  29. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  30. Spotnick........................SysOp....Alternative SysOp..............[514]
  31. Consensus Omnium................100.....................................[514]
  32. Dark Shadow.....................SysOp....Alternative Designer...........[514]
  33. French Mod Division.............50.......Alternative Worlds Modificatio.[514]
  34. Krusty..........................SysOp....Techno-Plus - C.E.O. / Sysop...[514]
  35. Lady............................100......Qui m'aime me suive! Mais pas .[514]
  36. Kipper..........................30......................................[509]
  37. The Lord Of Darkness............50......................................[514]0
  38. 0
  39.  
  40. Revision A:
  41.  
  42.  - Updated for WWIV v4.24
  43.  
  44.  ┌┬═══════┐
  45.  ││ Tests ││
  46.   └═══════┴┘
  47.  
  48.   This modification has been tested on a virgin WWIV v4.24 source using
  49.   Borland C++ v4.5
  50.  
  51. ──────────────────────────────────────────────────────────────────────────────
  52.                                    Legend
  53.                           ╔═══╤══════════════════┐
  54.                           │ + │ Add This Line    │
  55.                           │ - │ Delete This Line │
  56.                           │ * │ Modify This Line │
  57.                           │ = │ Existing Line    │
  58.                           └═══╧══════════════════╝
  59. ───[Step 1]────────────────────────────────────────────────────────────────────
  60.  
  61. Open MISCCMD.C and add the following function right after void list_users:
  62.  
  63.  
  64. void fmd_users_list(void)
  65. {
  66.   userrec u;
  67.   int i, i2, abort=0, c1, c2, c3;
  68.   char s[81], s1[80], s2[80], s3[80], s4[80], s5[6], s6[10];
  69.  
  70.   /* Converting Colors */
  71.   c1=thisuser.colors[8];
  72.   c2=thisuser.colors[9];
  73.   c3=thisuser.colors[0];
  74.   thisuser.colors[8]=1;
  75.   thisuser.colors[9]=8;
  76.   thisuser.colors[0]=15;
  77.  
  78.   outchr(12);
  79.  
  80.   litebar2("   Alias/User Handle          Main Level       User Note"
  81.            "           Area Code ");
  82.  
  83.   i2=number_userrecs();
  84.  
  85.   for (i=1; (i<=i2) && (!abort) && (!hangup); i++)
  86.   {
  87.     read_user(i, &u);
  88.     if (!(u.inact & inact_deleted))
  89.     {
  90.       switch(u.sl)
  91.       {
  92.         /* Level definition - add your own very easily! */
  93.         case 255: strcpy(s4,"3SysOp"); break;
  94.         case 50: strcpy(s4,"0Elite"); break;
  95.         case 30: strcpy(s4,"0Normal"); break;
  96.         case 10: strcpy(s4,"0Slave"); break;
  97.         default: itoa(u.sl,s4,10); break;
  98.       }
  99.       sprintf(s1,"7%s8%s", s4, charstr(9-strlen(stripcolors(s4)),'.'));
  100.       sprintf(s2,"%.30s8%s", u.name, charstr(32-strlen(u.name),'.'));
  101.       properize(s2);
  102.       sprintf(s4,"%.30s", u.note);
  103.       sprintf(s5,"%.3s", u.phone);
  104.       sprintf(s6,"%.3s", syscfg.systemphone);
  105.       sprintf(s3,"9%s8%s%c[%.3s]", s4, charstr(31-strlen(s4),'.'),
  106.                  (strcmp(s5,s6))?50:48, u.phone);
  107.       sprintf(s,"7%s%s%s", s2, s1, s3);
  108.       pla(s, &abort);
  109.     }
  110.   }
  111.   npr("\r\n7%d 8users on this system.\r\n\r\n", status.users);
  112.   thisuser.colors[8]=c1;
  113.   thisuser.colors[9]=c2;
  114.   thisuser.colors[0]=c3;
  115. }
  116.  
  117. ───[Step 2]────────────────────────────────────────────────────────────────────
  118.  
  119. Load COM.C and add the following function at the end of the file:
  120.  
  121. void litebar2(char *fmt, ...)
  122. {
  123.   va_list ap;
  124.   char s[512], s2[250];
  125.   
  126.   va_start(ap, fmt);
  127.   vsprintf(s, fmt, ap);
  128.   va_end(ap);
  129.  
  130.  if (okansi()) {
  131.    npr("\x1B[0;1;36m%s\r\n",charstr(strlen(s),'▄'));
  132.    sprintf(s2,"%s",stripcolors(s));
  133.    pl(s2);
  134.    npr("\x1B[0;1;30m%s\r\n",charstr(strlen(s),'▀'));
  135.  } else
  136.    pl(s);
  137.  ansic(0);
  138. }
  139.  
  140. ───[Step 3]────────────────────────────────────────────────────────────────────
  141.  
  142. Open MMENU.C and do the following modification:
  143.  
  144. =        }
  145. =        break;
  146. =      case 'U':
  147. +        fmd_users_list();
  148. +        break;
  149. =      case '~':
  150. =        list_users(0);
  151. =        break;
  152. =      case 'V':
  153. =        write_inst(INST_LOC_VOTE,0,INST_FLAGS_ONLINE);
  154.  
  155. 'U' will be the new listing, '~' will be the old WWIV user listing.
  156.  
  157. ───[Step 4]────────────────────────────────────────────────────────────────────
  158.  
  159. Compile back the BBS and you're done. If you add the function in COM.C,
  160. you will need to do a MAKE FCNS, else, it will work right away.
  161.  
  162. French Proverb: L'imitation est la plus sincère des flatteries.
  163.  
  164. For comments, bug report and suggestion, e-mail at the following address:
  165.  
  166. Nicolas LeBlanc  2@20302.WWIVnet (aka Spotnick)
  167.                  -> spotnick@gamemaster.qc.ca
  168. Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
  169.                  -> martin.bourdages@radio.magicnet.com
  170.  
  171.                  =>   French Mod Division Support Sub   <=
  172.                                 SubType: FMD
  173.                            Host: @20302 (WWIVnet)
  174.                       Scan sublist for other networks
  175.  
  176.         Read PRODUCTS.FMD for the full list of our support systems.
  177.  
  178. ───[EOF]──────────────────────────────────────────────────────────────────────
  179.