2 * IRC - Internet Relay Chat, include/whowas.h
3 * Copyright (C) 1990 Markku Savela
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)
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.
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.
23 /*=============================================================================
27 #define BITS_PER_COL 3
28 #define BITS_PER_COL_MASK 0x7
29 #define WW_MAX_INITIAL 16
31 #define MAX_SUB (1 << BITS_PER_COL)
32 #define WW_MAX_INITIAL_MASK (WW_MAX_INITIAL - 1)
33 #define WW_MAX (WW_MAX_INITIAL * MAX_SUB)
35 /*=============================================================================
48 struct Client *online; /* Needed for get_history() (nick chasing) */
49 struct Whowas *hnext; /* Next entry with the same hash value */
50 struct Whowas **hprevnextp; /* Pointer to previous next pointer */
51 struct Whowas *cnext; /* Next entry with the same 'online' pointer */
52 struct Whowas **cprevnextp; /* Pointer to previous next pointer */
55 /*=============================================================================
59 extern aClient *get_history(const char *nick, time_t timelimit);
60 extern void add_history(aClient *cptr, int still_on);
61 extern void off_history(const aClient *cptr);
62 extern void initwhowas(void);
63 extern int m_whowas(aClient *cptr, aClient *sptr, int parc, char *parv[]);
64 extern void count_whowas_memory(int *wwu, size_t *wwm, int *wwa, size_t *wwam);