ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid-7.2/include/whowas.h
Revision: 34
Committed: Sun Oct 2 21:05:51 2005 UTC (18 years, 6 months ago) by lusky
Content type: text/x-chdr
File size: 2597 byte(s)
Log Message:
create 7.2 branch, we can move/rename it as needed.


File Contents

# User Rev Content
1 adx 30 /*
2     * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
3     * whowas.h: Header for the whowas functions.
4     *
5     * Copyright (C) 2002 by the past and present ircd coders, and others.
6     *
7     * This program is free software; you can redistribute it and/or modify
8     * it under the terms of the GNU General Public License as published by
9     * the Free Software Foundation; either version 2 of the License, or
10     * (at your option) any later version.
11     *
12     * This program is distributed in the hope that it will be useful,
13     * but WITHOUT ANY WARRANTY; without even the implied warranty of
14     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     * GNU General Public License for more details.
16     *
17     * You should have received a copy of the GNU General Public License
18     * along with this program; if not, write to the Free Software
19     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20     * USA
21     *
22 knight 31 * $Id$
23 adx 30 */
24    
25     #ifndef INCLUDED_whowas_h
26     #define INCLUDED_whowas_h
27    
28     #include "ircd_defs.h"
29     #include "client.h"
30     #include "setup.h"
31    
32     struct Whowas
33     {
34     int hashv;
35     time_t logoff;
36     char name[NICKLEN];
37     char username[USERLEN + 1];
38     char hostname[HOSTLEN + 1];
39     char realname[REALLEN + 1];
40     char servername[HOSTLEN + 1];
41     struct Client *online; /* Pointer to new nickname for chasing or NULL */
42     struct Whowas *next; /* for hash table... */
43     struct Whowas *prev; /* for hash table... */
44     struct Whowas *cnext; /* for client struct linked list */
45     struct Whowas *cprev; /* for client struct linked list */
46     };
47    
48     /*
49     ** initwhowas
50     */
51     extern void init_whowas(void);
52    
53     /*
54     ** add_history
55     ** Add the currently defined name of the client to history.
56     ** usually called before changing to a new name (nick).
57     ** Client must be a fully registered user.
58     */
59     extern void add_history(struct Client *, int);
60    
61     /*
62     ** off_history
63     ** This must be called when the client structure is about to
64     ** be released. History mechanism keeps pointers to client
65     ** structures and it must know when they cease to exist. This
66     ** also implicitly calls AddHistory.
67     */
68     extern void off_history(struct Client *);
69    
70     /*
71     ** get_history
72     ** Return the current client that was using the given
73     ** nickname within the timelimit. Returns NULL, if no
74     ** one found...
75     */
76     extern struct Client *get_history(const char *, time_t);
77    
78     /*
79     ** for debugging...counts related structures stored in whowas array.
80     */
81     extern void count_whowas_memory(int *, unsigned long *);
82    
83     /* XXX m_whowas.c in modules needs these */
84     extern struct Whowas *WHOWASHASH[];
85     #endif /* INCLUDED_whowas_h */

Properties

Name Value
svn:eol-style native
svn:keywords Id Revision