home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / UTIL / WWIVE / MYWIVE.ZIP / HDR.MOD < prev    next >
Text File  |  1992-07-30  |  3KB  |  120 lines

  1. ┌────────────────────────────────────────────────────────────────────────┐
  2. │Mod : STIMP01.MOD                                                       │
  3. │Version: WWIV 4.20                                                      │
  4. │Author : Stimpy #1 @1002 NuclearArmsNET 442-1601                        │
  5. │Description: A simple Personal Tag mod using the User Note in Uedit     │
  6. │             so as not to trash the user list.                          │
  7. │Diffculty: ▓▓░░░░░░░░                                                   │
  8. │Disclaimer: Always backup your source. If you get an incredible urge to │
  9. │            sautee your cat, it's not my fault!                         │
  10. └────────────────────────────────────────────────────────────────────────┘
  11.  
  12.    = existing line
  13.    + add line
  14.    - deleted line
  15.    * change line
  16.  
  17. In UEDIT.C
  18.  
  19. In void print_data(int un, userrec *u, int lng)
  20.  
  21. =    npr("UpDn: U=%d-%ldk   D=%d-%ldk\r\n",u->uploaded,u->uk,
  22. =    u->downloaded, u->dk);
  23. =    npr("Baud: %u\r\n", u->lastrate);
  24. =  }
  25. =  if (u->note[0])
  26. *    npr("User's Tag: %s\r\n",(u->note));
  27. =  if (u->ass_pts)
  28. =    npr("Ass : %d\r\n",(u->ass_pts));
  29.  
  30. =        case 'O':
  31. =          nl();
  32. *          prt(1,"New Tag? ");
  33. =      inputl(s,39);
  34. =      strcpy(u.note,s);
  35. =      write_user(un,&u);
  36. =      break;
  37.  
  38. In DEFAULTS.C
  39.  
  40. In void print_cur_stat()
  41.  
  42. =  npr("B. Optional lines    : %d\r\n",thisuser.optional_val);
  43. =  if (thisuser.wwiv_regnum)
  44. =    npr("W. WWIV reg num      : %ld\r\n",thisuser.wwiv_regnum);
  45. =  else
  46. =    pl("W. WWIV reg num      : <NONE>");
  47. +    npr("O. Personal Tag      : %s\r\n",thisuser.note);
  48. =  pl("Q. Quit to main menu");
  49. =  nl();
  50. =  nl();
  51.  
  52. In void defaults()
  53.  
  54. =  int i,i1,i2,done;
  55. =  char s[81],s1[81],s2[81],ch;
  56.  
  57. =  done=0;
  58. =  print_cur_stat();
  59. =  do {
  60. =    nl();
  61. =    helpl=4;
  62. =    if (okansi()) {
  63. *      prt(2,"[Defaults]: (1-9,A-B,W,O,?,Q) : ");
  64. *      ch=onek("Q?123456789ABWO");
  65. =    } else {
  66. *      prt(2,"[Defaults]: (1-7,B,W,O,?,Q) : ");
  67. *      ch=onek("Q?1234567BWO");
  68. =    }
  69. =    switch(ch) {
  70. =      case 'Q':
  71. =        done=1;
  72. =        break;
  73.  
  74.  
  75. =      case 'W':
  76. =        enter_regnum();
  77. =        break;
  78. +      case 'O':
  79. +     nl();
  80. +        npr("%s \r\n",thisuser.note);
  81. +      nl();
  82. +      pl("You may now enter your new tag");
  83. +      prt(2,":");
  84. +      inputl(thisuser.note,40);
  85. +      sprintf(s,"Changed Tag to - %s",thisuser.note);
  86. +      sysoplog(s);
  87. +    break;
  88. =    }
  89. =  } while ((!done) && (!hangup));
  90. =}
  91.  
  92. In MSGBASE.C
  93.  
  94. In void inmsg()
  95.  
  96. =    if (fsed) {
  97. =      ll=filelength(i5);
  98. =      read(i5, (void *) (& (b[l1]) ),ll);
  99. =      l1 += ll;
  100. =      close(i5);
  101. =    } else {
  102. =      for (i5=0; i5<curli; i5++)
  103. =    addline(b,&(lin[i5*LEN]),&l1);
  104. =    }
  105. +       prt(5,"Do you want your Personal Tag displayed? ");
  106. +       if (yn()) /* You can change if (yn()) to if (ny()) if you want it to
  107.              default to Yes.*/
  108. +       {
  109. +    addline(b," ",&l1);
  110. +    sprintf(s,"7[1Personal Tag7]7:3 %s",thisuser.note);
  111. +    addline(b,s,&l1);
  112. +       }
  113. =    if (b[l1-1]!=26)
  114. =      b[l1++]=26;
  115. =    savefile(b,l1,&m,aux);
  116. =    if (fsed)
  117. =      unlink(fnx);
  118. =  } else {
  119.  
  120. Now save and recompile.