ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/include/whowas.h
Revision: 2748
Committed: Sun Jan 5 19:20:09 2014 UTC (11 years, 7 months ago) by michael
Content type: text/x-chdr
File size: 2562 byte(s)
Log Message:
- Fixed server name leak for hidden servers in /who, /whois and /whowas

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 michael 912 #include "config.h"
31 adx 30
32 michael 1358
33 adx 30 struct Whowas
34     {
35     int hashv;
36 michael 2748 int shide;
37 adx 30 time_t logoff;
38 michael 1431 char name[NICKLEN + 1];
39 michael 1358 char username[USERLEN + 1];
40 adx 30 char hostname[HOSTLEN + 1];
41     char realname[REALLEN + 1];
42     char servername[HOSTLEN + 1];
43     struct Client *online; /* Pointer to new nickname for chasing or NULL */
44 michael 1358 dlink_node tnode; /* for hash table... */
45     dlink_node cnode; /* for client struct linked list */
46 adx 30 };
47    
48     /*
49     ** initwhowas
50     */
51 michael 1358 extern void whowas_init(void);
52 adx 30
53     /*
54 michael 2300 ** whowas_add_history
55 adx 30 ** 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 michael 2300 extern void whowas_add_history(struct Client *, const int);
60 adx 30
61     /*
62 michael 2300 ** whowas_off_history
63 adx 30 ** 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 michael 2300 extern void whowas_off_history(struct Client *);
69 adx 30
70     /*
71 michael 2300 ** whowas_get_history
72 adx 30 ** Return the current client that was using the given
73     ** nickname within the timelimit. Returns NULL, if no
74     ** one found...
75     */
76 michael 2300 extern struct Client *whowas_get_history(const char *, time_t);
77 adx 30
78     /*
79     ** for debugging...counts related structures stored in whowas array.
80     */
81 michael 2297 extern void whowas_count_memory(unsigned int *const, uint64_t *const);
82 michael 1358 extern dlink_list WHOWASHASH[];
83 adx 30 #endif /* INCLUDED_whowas_h */

Properties

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