unrealircd

- supernets unrealircd source & configuration
git clone git://git.acid.vegas/unrealircd.git
Log | Files | Refs | Archive | README | LICENSE

whowas.h (2466B)

      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  * from original rcs 
     22  * $ Id: whowas.h,v 6.1 1991/07/04 21:04:39 gruner stable gruner $
     23  *
     24  * $ Log: whowas.h,v $
     25  * Revision 6.1  1991/07/04  21:04:39  gruner
     26  * Revision 2.6.1 [released]
     27  *
     28  * Revision 6.0  1991/07/04  18:05:08  gruner
     29  * frozen beta revision 2.6.1
     30  *
     31  * th+hybrid rcs version
     32  * $Id$
     33  */
     34 
     35 #ifndef	__whowas_include__
     36 #define __whowas_include__
     37 
     38 /* NOTE: Don't reorder values of these, as they are used in whowasdb */
     39 typedef enum WhoWasEvent {
     40     WHOWAS_EVENT_QUIT=0,
     41     WHOWAS_EVENT_NICK_CHANGE=1,
     42     WHOWAS_EVENT_SERVER_TERMINATING=2
     43 } WhoWasEvent;
     44 #define WHOWAS_LOWEST_EVENT 0
     45 #define WHOWAS_HIGHEST_EVENT 2
     46 
     47 /*
     48 ** add_history
     49 **	Add the currently defined name of the client to history.
     50 **	usually called before changing to a new name (nick).
     51 **	Client must be a fully registered user (specifically,
     52 **	the user structure must have been allocated).
     53 */
     54 void add_history(Client *, int, WhoWasEvent);
     55 
     56 /*
     57 ** off_history
     58 **	This must be called when the client structure is about to
     59 **	be released. History mechanism keeps pointers to client
     60 **	structures and it must know when they cease to exist. This
     61 **	also implicitly calls AddHistory.
     62 */
     63 void off_history(Client *);
     64 
     65 /*
     66 ** get_history
     67 **	Return the current client that was using the given
     68 **	nickname within the timelimit. Returns NULL, if no
     69 **	one found...
     70 */
     71 Client *get_history(const char *, time_t);
     72 					/* Nick name */
     73 					/* Time limit in seconds */
     74 
     75 /*
     76 ** for debugging...counts related structures stored in whowas array.
     77 */
     78 void count_whowas_memory(int *, u_long *);
     79 
     80 #endif /* __whowas_include__ */