                                PKsChat
                            by Ray Pecquet(PK)



        This program will add a chat room to your board.  Unlike some other
   chat programs this one has no trouble with odd based comm ports and IRQs
   because it runs inside of WWIV.  That mean that any adress WWIV can
   handle so can this chat.

        After adding PKsChat to your BBS your users will be able to page each
   other from almost any location on the board.  This will be where some
   slight moding comes into play.

   FEATURES:
        SYSOP defined instance color.
        Common chat.
        Supports as many line as you BBS supports with registered version.
        Action words.
        Directed comments.
        User paging users.
        Whispering.
        Room changing   RANGE 1-60,000
        Room lock outs   Prohibit other users from entering your room.
        User Profiles    User discriptions able to be called from any location
                         on your board.
        User defined Entrance and Exit messages.
        User defined color.
        User defined entrance/exit messages
        Sysop control flags for security levels, user colors, user action
              words, and user entrance/exit messages.


   THE SETUP
  **************************************************************************
  +     =ADD line
  &     =Modify line
  @     =Unchanged line for referance point
  ***************************************************************************
        
  NOTE: Upgraders from PKsChat v1.0 need to compare the code listed
        below with your current code. Some of the lines have changed
        to become simpler.


  Step 1:
        As usual back up all files before attempting to insert this progrm.
  ***************************************************************************
  Step 2:
        In FCNS.H add the following lines in the top of the file.

        @       #include "qwk.h"

        +       void pkschat(void);
        +       void page_user(void);
        +       void show_reg(void);

        @       /* File BBS.c */

  **************************************************************************
  Step 3:
        In mmenu.c


        @            sprintf(s1,"WWIVCHAT.EXE %s", create_chain_file());
        @            extern_prog(s1, sysinfo.spawn_opts[8]);
        @                       } else
        +                       pkschat();
        -                       chat_room();       REMOVE THIS LINE
        @                       }

        Replace the chat_romm(); line with pkschat();

  ***************************************************************************
  Step 4:
        Still in mmenu.c, but above the code of Step 3


        @  if (strcmp(s,"/O")==0) {
        @       if (numbatchdl!=0) {
        @                nl();
        @        outstr(get_string(1324));
        @        if (ny())
        @          batchdl(1);
        @        hangup=1;
        @        } else
        @        hangup=1;
        @        }
        +
        +   //PKsChat mod
        +        if (strcmp(s,"/P")==0){
        +                nl();
        +                page_user();
        +        }//close if for /P
        +
        +        if (strcmp(s,"/Y")==0){
        +                nl();
        +                show_reg();
        +        }//close if for /Y
        +   // End PKsChat mod

        @        if ((strcmp(s,"/R")==0) && (sysinfo.flags & OP_FLAGS_RIP_SUPPORT)) {
        @        thisuser.sysstatus &= ~sysstatus_disable_rip;

        This allows the user to page someone from the main menu by pushing
        /p   Make sure you add this to your help menu.
        The /Y allows a user to look up the registry of another user from
        the main menu.

*****************************************************************************
        Step 5:
            Again in the mmenu.c file.

        @          if (strcmp(s,"WHO")==0) {
        @        multi_instance();
        @        }
        +
        +        if (strcmp(s,"/P")==0){
        +                nl();
        +                page_user();
        +        }//close if for /P
        +
        +        if (strcmp(s,"/Y")==0){
        +                nl();
        +                user_reg();
        +        }//close if for /Y

        @        /* download cosysop checks here */
        @        if (dcs()) {

***************************************************************************
Step 6:
        Personal additions.  If you notice the code in step 4 & 5 that was
        added is the same.  You should be able to use this same block in other
        areas.  At this point users can respond to pages from the main
        menu and the transfer menu and also examine user registries.
***************************************************************************
Step 7: Open UEDIT.C and block copy this to the TOP of the file:


  @      #include "vars.h"

  @      #pragma hdrstop

  @      static unsigned long *u_qsc;

  +      #include <ctype.h>
  +      #include <share.h>
  +      void kill_registry(int  un){
  +              FILE    *fh;
  +              char    *path,*files_l,*index;
  +              int     num;

  +              path=(char *)calloc(50,sizeof(char));
  +              files_l=(char *)calloc(95,sizeof(char));

  +      //Get the directory info
  +                while ( (fh=_fsopen("pkschat.ini","rt",SH_DENYRW))==NULL){}
  +                      fgets(files_l,94,fh);
  +                fclose(fh);

  +        index=files_l;
  +              while ( !isspace(index[0]) ){index++;}
  +                      strcpy(index,"\0");
  +
  +                      sprintf(path,"%s\\%d.reg",files_l,un);
  +
  +                      remove(path);
  +
  +              sprintf(path,"%s\\%d.dat",files_l,un);

  +              remove(path);

  +              free(path);
  +              free(files_l);
  +        return;
  +      }

*****************************************************************************
Step 8:
        Copy the file called  chat.obj into the directory where your compiler
        creates all the bbs object files.
****************************************************************************
Step 9:
        In your makefile.mak

@        subxtr.obj   sysopf.obj   tedit.obj    uedit.obj    \
@        voteedit.obj xferovl.obj  xferovl2.obj xfertmp.obj  \
&        xinit.obj    chat.obj
@
@ BBS_O_OVL = \
@        $(OBJ)\batch.obj    $(OBJ)\bbsovl1.obj  $(OBJ)\bbsovl2.obj  \
@        $(OBJ)\bbsovl3.obj  $(OBJ)\chnedit.obj  $(OBJ)\conf.obj     \
@        $(OBJ)\defaults.obj $(OBJ)\diredit.obj  $(OBJ)\extrn1.obj   \
@        $(OBJ)\gfiles.obj   $(OBJ)\gfledit.obj  $(OBJ)\ini.obj      \
@        $(OBJ)\instmsg.obj  $(OBJ)\lilo.obj     $(OBJ)\misccmd.obj  \
@        $(OBJ)\multinst.obj $(OBJ)\multmail.obj $(OBJ)\netsup.obj   \
@        $(OBJ)\newuser.obj  $(OBJ)\qwk.obj      $(OBJ)\qwk1.obj     \
@        $(OBJ)\readmail.obj $(OBJ)\ripovl.obj   $(OBJ)\sr.obj       \
@        $(OBJ)\srrcv.obj    $(OBJ)\srsend.obj   $(OBJ)\subedit.obj  \
@        $(OBJ)\subreq.obj   $(OBJ)\subxtr.obj   $(OBJ)\sysopf.obj   \
@        $(OBJ)\tedit.obj    $(OBJ)\uedit.obj    $(OBJ)\voteedit.obj \
@        $(OBJ)\xferovl.obj  $(OBJ)\xferovl2.obj $(OBJ)\xfertmp.obj  \
&        $(OBJ)\xinit.obj    $(OBJ)\chat.obj

*****************************************************************************
Step 10:
        Start your compiler and root it on......faster faster........
*****************************************************************************
Step 11:
                pkschat.ini

       Place this file in your bbs directory.

     Line one of the file should be the path to the chat files.
     Line two should be the path for the working directory.  I highly,
       highly, highly recomend using a RAM drive.  There is lots of disk
       accessing that goes on here and a RAM drive is very usefull.
     Line three is the list of colors that you want each instance to be.
       The first digit is instance 1 the second digit is instance 2, ect....
       EX:      1234
       Inst #1 = Lite blue
       Inst #2 = Yellow
       Inst #3 = Purple
       Inst #4 = White on Blue


        There are more options explained in the PKsChat.ini file itself.


     Next copy pkschat.act to you chat files directory.

     If you've done everything correctly you should be ready to run.




Registration and help:

        Right now the chat room will not work with instances over 2.  If you
    register it then you will have unlimited instance use.

    To register send $15 to:
                        Ray Pecquet
                        8200 Murlesan St.
                        Harahan,        La.     70123
TerraNet @5409
WWIVnet  @1520

Be sure to include your name, address, phone #, bbs name, and bbs phone #.

I have just started a Terranet support sub.

Name:   PKsChat info, suggestion, and complaints
Type:   pkschat
Node:   5409

Subscribe and let me know what you think or what you'd like to see added.







