home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / MODSUNKN.ZIP / COL-NOTE.MOD < prev    next >
Text File  |  1992-12-01  |  3KB  |  105 lines

  1. 176/200: Now users can send obnoxious notes to each other ...
  2. [__Handle__] Midnight Tree Bandit #73 @8424
  3. [Date--Time] Thu Aug 16 00:00:16 1990
  4. [__Origin__] Dragon's Rest (E-Va. <Amherst/Richmond>)
  5.  
  6.     |
  7.     |   Send an Obnoxious Note
  8.     |       by Midnight Tree Bandit
  9.     |
  10. ----+------------------------------------
  11.     |   5/17/90
  12.  
  13. Dan Steele 1@5800 (WWIVNet) originally wrote this thing.  His version was for 
  14. sysops only, though.  With some help from Bloose and inspirations from other 
  15. mods, I have made a few enhancements.  This is not nearly as distinctive as 
  16. Bloose's version, but you can do that yourself.
  17.  
  18. First off, here's the part that does all the work.  You can put it anywhere, 
  19. but I have it in BBSUTL1.  It could also go in BBS.C, which may be better, 
  20. since that's where it gets called.
  21.  
  22. void sendnote()
  23. {
  24.   userrec u;
  25.   unsigned short i;
  26.   char s[81],s1[81];
  27.  
  28.   nl(); nl(); prt(3,"Send a mental note to whom? ");
  29.   mpl(30);
  30.   inputl(s,30);
  31.   i=finduser1(s);
  32.   if (i>0) {
  33.     read_user(i,&u);
  34.     nl();
  35.     sprintf(s,"Send a note to %s ? ",nam(&u,i));
  36.     prt(2,s);
  37.     if (yn()) {
  38.       nl();
  39.       prt(5,"Enter one line of colorful text.  Max: 70 chars."); nl(); nl();
  40.       prt(3,":");
  41.       mpl(70);
  42.       s[0]=0;
  43.       inli(s1,s,80,1);
  44.       if (s1[0]==0) {
  45.         nl(); pl("Oh.  Changed your mind?");
  46.       } else {
  47.         outstr("Is that all right? ");
  48.         if (yn())  {
  49.           sprintf(s,"==> Mental Note From %s: ",nam(&thisuser,usernum));
  50.           ssm(i,0,s);
  51.           sprintf(s,"==>   \"%s\"",s1);
  52.           ssm(i,0,s);
  53.           nl();
  54.           pl("Your note has been delivered.");
  55.          } else
  56.           pl("Oh, well forget it, then.");
  57.         }
  58.     } else {
  59.       nl();
  60.       pl("Oh, well forget it, then.");
  61.       }
  62.   } else {
  63.      nl();
  64.      pl("User doesn't exist.");
  65.      }
  66. }
  67.  
  68. [Note the color-coding in these.  If you captured this in a way that didn't 
  69. take the ^C's, you'll need to put them before each number that seems out of 
  70. place.]
  71.  
  72.  
  73. Okay, now we'll call it.  In BBS.C, somewhere in 'void mainmenu()':
  74.  
  75.    if (strcmp(s,"/E")==0)
  76.      slash_e();
  77.    if (strcmp(s,"/N")==0)
  78.      nscan(cursub);
  79. *  if ((strcmp(s,"/X")==0) && (strcmp(thisuser.name,"GUEST")))
  80. *    sendnote();
  81.    if (strcmp(s,"/C")==0) {
  82.  
  83.  
  84. And finally, so that you, the evil-minded sysop, can send notes from the WFC 
  85. screen, add this to 'void getcaller();':
  86.  
  87.         case 'N':
  88.           if (ok_local())
  89.             print_local_file("NET.LOG","");
  90.           break;
  91. *       case 'O':
  92. *         if (ok_local()) {
  93. *           holdphone(1);
  94. *           sendnote();
  95. *           holdphone(0);
  96. *         }
  97. *         break;
  98.         case 'P':
  99.           print_pending_list();
  100.  
  101.  
  102. And that's it.  Or, as some of the more illiterate sysops like to write it, 
  103. "recompile and your done".  (Some of these kids spend MUCH too much time at a 
  104. keyboard).
  105.