home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / java / in4wjcxu / other / irc / include / whowas.h < prev   
Encoding:
C/C++ Source or Header  |  1996-08-14  |  2.5 KB  |  90 lines

  1. /************************************************************************
  2.  *   IRC - Internet Relay Chat, include/whowas.h
  3.  *   Copyright (C) 1990  Markku Savela
  4.  *
  5.  *   This program is free software; you can redistribute it and/or modify
  6.  *   it under the terms of the GNU General Public License as published by
  7.  *   the Free Software Foundation; either version 1, or (at your option)
  8.  *   any later version.
  9.  *
  10.  *   This program is distributed in the hope that it will be useful,
  11.  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.  *   GNU General Public License for more details.
  14.  *
  15.  *   You should have received a copy of the GNU General Public License
  16.  *   along with this program; if not, write to the Free Software
  17.  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  */
  19.  
  20. /*
  21.  * $Id: whowas.h,v 6.1 1991/07/04 21:04:39 gruner stable gruner $
  22.  *
  23.  * $Log: whowas.h,v $
  24.  * Revision 6.1  1991/07/04  21:04:39  gruner
  25.  * Revision 2.6.1 [released]
  26.  *
  27.  * Revision 6.0  1991/07/04  18:05:08  gruner
  28.  * frozen beta revision 2.6.1
  29.  *
  30.  */
  31.  
  32. #ifndef    __whowas_include__
  33. #define __whowas_include__
  34.  
  35. #ifndef PROTO
  36. #if __STDC__
  37. #    define PROTO(x)    x
  38. #else
  39. #    define PROTO(x) ()
  40. #endif /* __STDC__ */
  41. #endif /* ! PROTO */
  42.  
  43. /*
  44. ** WHOWAS structure moved here from whowas.c
  45. */
  46. typedef struct aname {
  47.     anUser    *ww_user;
  48.     aClient    *ww_online;
  49.     time_t    ww_logout;
  50.     char    ww_nick[NICKLEN+1];
  51.     char    ww_info[REALLEN+1];
  52. } aName;
  53.  
  54. /*
  55. ** add_history
  56. **    Add the currently defined name of the client to history.
  57. **    usually called before changing to a new name (nick).
  58. **    Client must be a fully registered user (specifically,
  59. **    the user structure must have been allocated).
  60. */
  61. void    add_history PROTO((aClient *));
  62.  
  63. /*
  64. ** off_history
  65. **    This must be called when the client structure is about to
  66. **    be released. History mechanism keeps pointers to client
  67. **    structures and it must know when they cease to exist. This
  68. **    also implicitly calls AddHistory.
  69. */
  70. void    off_history PROTO((aClient *));
  71.  
  72. /*
  73. ** get_history
  74. **    Return the current client that was using the given
  75. **    nickname within the timelimit. Returns NULL, if no
  76. **    one found...
  77. */
  78. aClient    *get_history PROTO((char *, time_t));
  79.                     /* Nick name */
  80.                     /* Time limit in seconds */
  81.  
  82. int    m_whowas PROTO((aClient *, aClient *, int, char *[]));
  83.  
  84. /*
  85. ** for debugging...counts related structures stored in whowas array.
  86. */
  87. void    count_whowas_memory PROTO((int *, int *, u_long *));
  88.  
  89. #endif /* __whowas_include__ */
  90.