home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / RANK.ZIP / RANK.DOC < prev   
Text File  |  1992-04-22  |  5KB  |  171 lines

  1.  
  2.                Sysop Configurable Ranks V 1.02
  3.                  Written By: Dr. D.
  4.                   Black Cross 1992
  5.  
  6.      I have written this mod beacuse some sysops asked me if I could
  7.      make a rank mod that you could change through WFC or something
  8.      and not half to go through the source and change it.  So I made
  9.      a primative version of this mod (V 1.00) that was never disturbted
  10.      and only had on rank set unlike this where you can have male and
  11.      female ranks.So to get started
  12.  
  13.      Files: RANK.C       - Main Source File
  14.         RANK.DOC     - Doc
  15.         RANK.DAT     - Premade Ranks (Configurable)
  16.         MAKEFILE.MAK - Makefile (Use if you didn't add additional .C files)
  17.  
  18.      First Copy RANK.DAT into your main WWIV directory
  19.  
  20.      Second Load Up VARDEC.H and Skip beforefore the last #endif
  21.  
  22.  
  23.                        Key
  24.                 ┌──────────────┐
  25.                 │ * - Look For │
  26.                 │ + - Add      │
  27.                 │ % - Change   │
  28.                 └──────────────┘
  29.  
  30. *  } modem_info;
  31. *
  32. +  typedef struct {
  33. +    char rank[53][41];
  34. +  } rank_nfo;
  35. *
  36. *  /*************************************************************************/
  37. *
  38. *
  39. *  #endif
  40.  
  41.    Save File and Load Up BBS.C and find
  42.  
  43. *  if (strcmp(s,"GFILEDIT")==0) {
  44. *    sysoplog("@ Ran Gfileedit");
  45. *    gfileedit();
  46. *  }
  47. +  if (strcmp(s,"RANKEDIT")==0) {
  48. +    if (checkpw()) {
  49. +      sysoplog("@ Ran Rankedit");
  50. +      rankedit();
  51. +    }
  52. +  }
  53. *  if (strcmp(s,"DOS")==0) {
  54. *    if (checkpw()) {
  55. *      sysoplog("@ Shelled to DOS);
  56.  
  57.    Skip Down Farther in BBS.C
  58.  
  59. *    switch (ch) {
  60. *    case '?':
  61. *      if (ok_local()) {
  62. *        printmenu(7);
  63. *        nl();
  64. *        getkey();
  65. *      }
  66. *      break;
  67. +    case ',':
  68. +      rankedit();
  69. +      break;
  70. *    case ' ':
  71. *      outs("Log On? ");
  72.  
  73.    Save BBS.C and load BBSUTL.C and find
  74.  
  75. *  void yourinfo()
  76. *  {
  77. +    ranks();
  78. *    outchr(12);
  79. *    npr("Your name      : %s\r\n",nam(&thisuser,usernum));
  80. *    npr("Phone number   : %s\r\n",thisuser.phone);
  81. +    npr("Rank           : %s\r\n",rank[0]);
  82. *    if (thisuser.waiting)
  83. *      npr("Mail Waiting    : %s\r\n",thisuser.waiting);
  84.  
  85.    Save BBSUTL.C and load MSGBASE.C and find
  86.  
  87. *  void inmsg(messagerec *m1, char *title, int *annony, int needtitle, char *aux, int fsed)
  88. *  {
  89. %    char s[LEN],s1[LEN],s2[LEN],s3[81],ro[81],fnx[81],chx,*ss,*ss1;
  90. *    int maxli,curli,done,save,savel,i,i1,i2,i3,i4,i5,f,setanon,gati[50],gatp;
  91. *    messagerec m;
  92. *    long ll,l1;
  93. *    char *lin, *b;
  94. *    int real_name=0;
  95. *
  96.  
  97.    Skip farther down in this function and find
  98.  
  99. *
  100. *      l1=0;
  101. *      if (real_name)
  102. +        sprintf(s3,"%s [%s]",thisuser.realname,rank[0]);
  103. %        addline(b,s3,&l1);
  104. *      else
  105. +        sprintf(s3,"%s [%s]",nam1(&thisuser,usernum,syscfg.systemnumber),rank[0]);
  106. %        addline(b,s3,&l1);
  107. *      time(&ll);
  108. *      strcpy(s,ctime(&ll));
  109.  
  110.    Save MSGBASE.C and Load LILO.C (BBSUTL.C For 4.12 and Lower) and find
  111.  
  112. *  if (live_user) {
  113. *    nl();
  114. +    ranks();
  115. *    npr("Name: %s\r\n",nam(&thisuser,usernum));
  116. +    npr("Rank: %s\r\n",rank[0]); /* Add If You Want To */
  117. *    npr("Time allowed on: %d\r\n", (int) ((nsl()+30/60.0));
  118.  
  119.    Save This File and load NEWUSER.C and find
  120.  
  121. *   thisuser.bwcolors[6]=143;
  122. *   thisuser.bwcolors[7]=7;
  123. *
  124. *   reset_act_sl();
  125. *
  126. +   ranks();
  127. *
  128. *   for (i=0; i<6; i++) {
  129. *     ch=rand() % 36;
  130.  
  131.    Save this file and add RANK.C to your MAKE or .PRJ file.  I can only give
  132.    your instructions on adding this to your MAKE file beacuse only have
  133.    expernece in using the MAKE file. So load up MAKEFILE.MAK and find.
  134.    Use my MAKEFILE.MAK I have included if you did not add any other .C
  135.    files in your source.
  136.  
  137. %          $(OBJ)utility.obj $(OBJ)xfer.obj $(OBJ)netsup.obj $(OBJ)rank.obj
  138. *  #
  139.  
  140.    Skip farther down in the file and find
  141.  
  142. *  $(OBJ)netsup.obj  : netsup.c  vars.h vardec.h net.h
  143. *    $(TCC_NRM)
  144. +  $(OBJ)rank.obj    : rank.c    vars.h vardec.h
  145. +    $(TCC_NRM)
  146.  
  147.    Now if you are using the makefile run a MAKE FCNS and you will not half
  148.    to worry about this step.  But if you are using the MAKE FCNS function
  149.    and you get an error load up FCNS.H, skip to the end and add
  150.  
  151. +  /* File: rank.c */
  152. +
  153. +  void rankedit();
  154. +  void read_ranks();
  155. +  void write_ranks();
  156. +  void male_list();
  157. +  void female_list();
  158. +  void change_ranks();
  159. +  void change_ranks();
  160. +  void var_quit();
  161. +  void ranks();
  162.  
  163.    Save this file and compile your BBS.If you ever want to call up user ranks
  164.    use rank[0] (i.e npr("Rank: %s",rank[0]);).Thats about it if you have
  165.    any questions or comments on this mod E-Mail Dr. D. #3 on Black Cross BBS
  166.    (410)486-9749.
  167.  
  168.    Last Comments: To acess this press , from  WFC or //RANKEDIT from the BBS.
  169.  
  170.  
  171.