home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / p / prok345.zip / PRONODE.INT < prev    next >
Text File  |  1993-01-07  |  4KB  |  108 lines

  1. function node_mapsize: word;
  2.    {returns size of the usernet.xxx "bitmaps" used to encode node attention
  3.     and node up/down status}
  4.  
  5. function node_pos(node: integer): longint;
  6.    {returns the lseek position within usernet.xxx to access a specified node's
  7.     usernet record. unet_header must be initialized before calling this}
  8.  
  9. procedure set_node_up(fd: dos_handle; node: integer; state: boolean);
  10.    {alters the node up/down status bit in usernet.xxx file}
  11.  
  12. procedure set_node_info(newcode: char;
  13.                         name: anystring;
  14.                         city: anystring;
  15.                         operation: anystring);
  16.    {sets all variable information in the current node's usernet.xxx entry.
  17.     newcode may be any of the node_* code constants defined below}
  18.  
  19. procedure set_node_status(newcode: char);
  20.    {changes the node status code in usernet.xxx.  leaves name and city
  21.     alone but blanks operation if previously set}
  22.  
  23. procedure set_node_operation(operation: anystring);
  24.    {changes the node operation message in usernet.xxx.  leaves status, name
  25.     and city alone{
  26.  
  27. function node_idle_time(node: integer): anystring;
  28.    {returns a text formatted "xxx min" idle time since a caller log entry
  29.     was made for the specified node}
  30.  
  31. procedure touch_caller_log;
  32.    {change the last-modification date of this node's CALLER log file.  resets
  33.     this node's "idle time" to 0}
  34.  
  35. procedure node_status_display;
  36.    {prints the standard "node status" display}
  37.  
  38. procedure live_chat;
  39.    {activates a "live chat" mode}
  40.  
  41. procedure node_chat;
  42.    {currently handles the "chat u" / "chat a" commands to set chat
  43.     available/unavailable status.  If par='CHAT' will activate the
  44.     live_chat procedure above}
  45.  
  46. procedure check_chat_request;
  47.    {called during input() procedure to check if another node wants to
  48.     chat with this node.  displays a message from PROREQ if needed}
  49.  
  50. const
  51.   chat_poll: boolean = true;    {true if polling for chat}
  52.  
  53.   {some of the status codes that can be passed to set_node_status}
  54.   node_no_caller        = ' ';
  55.   node_available        = 'A';
  56.   node_in_door          = 'D';
  57.   node_entering_msg     = 'E';
  58.   node_group_chat       = 'G';
  59.   node_logoff_pending   = 'L';
  60.   node_chatting         = 'N';
  61.   node_logging_on       = 'O';
  62.   node_paging_sysop     = 'P';
  63.   node_sysop_chat       = 'C';
  64.   node_chat_request     = 'R';
  65.   node_transfer         = 'T';
  66.   node_unavailable      = 'U';
  67.   node_dropping_2dos    = 'X';
  68.   node_going_down       = #0;  {not a standard code}
  69.   node_prev_code:  char = #255;
  70.  
  71. type
  72.    stat_msg_rec = record
  73.       code: char;
  74.       msg:  string20;
  75.    end;
  76.  
  77. const
  78.    max_node_stat = 20;
  79.  
  80.    node_stat_text: array[1..max_node_stat] of stat_msg_rec = (
  81.                  (code: ' '; msg: 'No caller this node'),
  82.                  (code: 'A'; msg: 'Available for Chat'),
  83.                  (code: 'B'; msg: 'Remote Drop to DOS'),
  84.                  (code: 'C'; msg: 'Chatting with Sysop'),
  85.                  (code: 'D'; msg: 'Running a DOOR'),
  86.                  (code: 'E'; msg: 'Entering a Message'),
  87.                  (code: 'G'; msg: 'Group Chat'),
  88.                  (code: 'L'; msg: 'Auto Logoff Pending'),
  89.                  (code: 'M'; msg: 'Broadcast Message'),
  90.                  (code: 'N'; msg: 'Chatting with Node#'),
  91.                  (code: 'O'; msg: 'Logging Into System'),
  92.                  (code: 'P'; msg: 'Paging the Sysop'),
  93.                  (code: 'R'; msg: 'Chat Request Sent'),
  94.                  (code: 'S'; msg: 'Answering Script'),
  95.                  (code: 'T'; msg: 'Transfering a File'),
  96.                  (code: 'U'; msg: 'Unavailable for Chat'),
  97.                  (code: 'W'; msg: 'Waiting for Node#'),
  98.                  (code: 'X'; msg: 'Drop to DOS Pending'),
  99.                  (code: 'Y'; msg: 'No caller this node'),
  100.                  (code:  #0; msg: 'Node unavailable'));
  101.  
  102. var
  103.    unet_header:   usernet_header_rec;
  104.    {must be read from head of usernet.xxx before calling node_mapsize o
  105.     or node_pos above}
  106.  
  107.  
  108.