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

  1. /*        ChatWish.mod -- written by:                                       *
  2.  *            Admiral Connors, Sysop of the Starport Equeluus,              *
  3.  *                                            Highland, Ca.                 *
  4.  *                                       714-864-1898 2400,8,N,1            *
  5.  *                                                                          *
  6.  *                                                                          *
  7.  *    This modification was created for SysOps who wince at the idea of     *
  8.  *  crashing in on a user with the dramatic (but awsome) Two Way Chat.      *
  9.  *    Shift F9 prints a message to the user telling him/her that the        *
  10.  *  sysop wishes to chat with him/her, as soon as they are done with        *
  11.  *  what they are doing. The user then has the option of either ignoring    *
  12.  *  the message or hitting "C" to chat. Choosing the latter will put you    *
  13.  *  right into the appropriate chat mode. If he goes about on his merry     *
  14.  *  way and ignores you, you can hit the scroll lock and give him the       *
  15.  *  standard "Sysop not available" message when he finally decides >HE<     *
  16.  *  wants to chat....                                                       *
  17.  */
  18.  
  19. /*============================== In VARS.H add ============================*/
  20.  
  21. int wishes;
  22.  
  23. /*============================= In FCNS.H add =============================*/
  24.  
  25. void chatwish();
  26.  
  27. /*===================== In CONIO.C make these additions ===================*/
  28. /*                Add this after the other extern declarations             */
  29.  
  30. extern int wishes;
  31.  
  32. /*========================== Also in CONIO.C ==============================*/
  33.  
  34.  
  35.         case 88: /* Shift-F5 */                       /* Search on */
  36.           il=(rand() % 20) + 10;
  37.           for (i=0; i<i1; i++)
  38.             outchr(rand() % 256);
  39.           hangup=1;
  40.           dtr(0);
  41.           break;
  42.         case 92: /* Shift-F9 */                       /* add */
  43.           wishes=1;                                   /* add */
  44.           chatwish();                                 /* add */
  45.           break;                                      /* add */
  46.         case 98: /* Ctrl-F5 */                        /* Existing line */
  47.  
  48. /*=================== End of CONIO.C additions =============================*/
  49.  
  50.  
  51.  
  52. /*========== In BBSUTL.C add this after the other extern declarations ======*/
  53.  
  54. extern int wishes;
  55.  
  56. /*=========== Also, in BBSUTL.C add this function above void reqchat() =====*/
  57.  
  58.  
  59. void chatwish()
  60. {
  61.  
  62.         char xl[81],cl[81],atr[81],cc,s[81];
  63.  
  64.  
  65.         savel(cl,atr,xl,&cc);
  66.  
  67.         ansic(0);
  68.         nl();
  69.         nl();
  70.         pl("The SysOp wishes to chat with you...");
  71.         pl("If you would like to chat hit \"C\" when done,");
  72.         pl("or you can ignore this message.....");
  73.         nl();
  74.         nl();
  75.  
  76.         restorel(cl,atr,xl,&cc);
  77.  
  78. }
  79.  
  80. /*========= Also in BBSUTL.C, make these mods to void reqchat() ============*/
  81.  
  82. void reqchat()
  83. {
  84.  
  85.  
  86.  int ok,ok1;                                   /* change */
  87.  char s[81];
  88.  
  89.  nl();
  90.  nl();
  91.  ok=sysop2();
  92.  ok1=sysop1();                                 /* add */
  93.   if ((ok1) && (wishes==1)) {                  /* add */
  94.     wishes=0;                                  /* add */
  95.     chat1("",1);                               /* add */
  96.     return;                                    /* add */
  97.   }                                            /* add */
  98.  if (restrict_chat & thisuser.restrict)
  99.    ok=0;
  100.  if (ok) {
  101.    if (chatcall) {
  102.      chatcall=0;
  103.      pl("Chat call turned off.");
  104.      topscreen();
  105.    } else {
  106.      helpl=3;
  107.      prt(2,"Reason: ");
  108.      inputl(s,70);
  109.      if (s[0]) {
  110.        chatcall=1;
  111.        strcpy(chatreason,"Chat: ");
  112.        strcat(chatreason,s);
  113.        nl();
  114.        sysoplog(chatreason);
  115.        for (ok=strlen(chatreason); ok<80; ok++)
  116.         chatreason[ok]=32;
  117.         chatreason[80]=0;
  118.         topscreen();
  119.         pl("Chat call turned ON.");
  120.         nl();
  121.      }
  122.     }
  123.   } else {
  124.     pl("Sysop not available.");
  125.     nl();
  126.     pl("Use feedback instead.");
  127.     if (wishes==1) {                           /* add */
  128.        wishes=0;                               /* add */
  129.        strcpy(irt,"Ignored Wish.");            /* add */
  130.        imail(1,0);                             /* add */
  131.     } else {                                   /* add */
  132.        strcpy(irt,"Tried Chatting.");
  133.        imail(1,0);
  134.     }
  135.   }
  136. }
  137.  
  138. /*========================== End BBSUTL.C Changes ==========================*/
  139. /*  For now the sysop will have to be responsible for hitting scroll lock   *
  140.  *  if he changes his mind and walks away...That way the user doesn't get   *
  141.  *  stuck in chat...                                                        */
  142.  
  143. /*   Beacuse items were added to VARS.H and FCNS.H, you must re-compile the *
  144.  * entire bbs.            But I'm sure you knew that already!               *
  145.  */
  146.  
  147. /*=========================== End Chatwish.mod =============================*/
  148.