ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/include/whowas.h
Revision: 1592
Committed: Sat Oct 27 21:02:32 2012 UTC (11 years, 5 months ago) by michael
Content type: text/x-chdr
File size: 2491 byte(s)
Log Message:
- Second time's the charm? Moving svnroot/ircd-hybrid-8 to
  svnroot/ircd-hybrid/trunk

File Contents

# Content
1 /*
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 * $Id$
23 */
24
25 #ifndef INCLUDED_whowas_h
26 #define INCLUDED_whowas_h
27
28 #include "ircd_defs.h"
29 #include "client.h"
30 #include "config.h"
31
32
33 struct Whowas
34 {
35 int hashv;
36 time_t logoff;
37 char name[NICKLEN + 1];
38 char username[USERLEN + 1];
39 char hostname[HOSTLEN + 1];
40 char realname[REALLEN + 1];
41 char servername[HOSTLEN + 1];
42 struct Client *online; /* Pointer to new nickname for chasing or NULL */
43 dlink_node tnode; /* for hash table... */
44 dlink_node cnode; /* for client struct linked list */
45 };
46
47 /*
48 ** initwhowas
49 */
50 extern void whowas_init(void);
51
52 /*
53 ** add_history
54 ** Add the currently defined name of the client to history.
55 ** usually called before changing to a new name (nick).
56 ** Client must be a fully registered user.
57 */
58 extern void add_history(struct Client *, int);
59
60 /*
61 ** off_history
62 ** This must be called when the client structure is about to
63 ** be released. History mechanism keeps pointers to client
64 ** structures and it must know when they cease to exist. This
65 ** also implicitly calls AddHistory.
66 */
67 extern void off_history(struct Client *);
68
69 /*
70 ** get_history
71 ** Return the current client that was using the given
72 ** nickname within the timelimit. Returns NULL, if no
73 ** one found...
74 */
75 extern struct Client *get_history(const char *, time_t);
76
77 /*
78 ** for debugging...counts related structures stored in whowas array.
79 */
80 extern void count_whowas_memory(unsigned int *, uint64_t *);
81 extern dlink_list WHOWASHASH[];
82 #endif /* INCLUDED_whowas_h */

Properties

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