ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/src/whowas.c
(Generate patch)

Comparing ircd-hybrid/branches/8.2.x/src/whowas.c (file contents):
Revision 7329 by michael, Thu Feb 18 21:07:50 2016 UTC vs.
Revision 7392 by michael, Sat Mar 5 16:55:57 2016 UTC

# Line 37 | Line 37 | static struct Whowas WHOWAS[NICKNAMEHIST
37   dlink_list WHOWASHASH[HASHSIZE];
38  
39  
40 + /*! \brief Initializes whowas table
41 + */
42   void
43   whowas_init(void)
44   {
# Line 44 | Line 46 | whowas_init(void)
46      WHOWAS[i].hashv = -1;
47   }
48  
49 + /*! \brief Adds 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.
52 + * \param client_p pointer to Client struct to add
53 + * \param online   either 1 if it's a nick change or 0 on client exit
54 + */
55   void
56   whowas_add_history(struct Client *client_p, const int online)
57   {
# Line 86 | Line 94 | whowas_add_history(struct Client *client
94    dlinkAdd(whowas, &whowas->tnode, &WHOWASHASH[whowas->hashv]);
95   }
96  
97 + /*! \brief This must be called when the client structure is about to
98 + *         be released. History mechanism keeps pointers to client
99 + *         structures and it must know when they cease to exist.
100 + * \param client_p pointer to Client struct
101 + */
102   void
103   whowas_off_history(struct Client *client_p)
104   {
# Line 98 | Line 111 | whowas_off_history(struct Client *client
111    }
112   }
113  
114 + /*! \brief Returns the current client that was using the given
115 + *         nickname within the timelimit. Returns NULL, if no
116 + *         one found...
117 + * \param nick      name of the nick
118 + * \param timelimit maximum age for a client since log-off
119 + */
120   struct Client *
121   whowas_get_history(const char *nick, uintmax_t timelimit)
122   {
# Line 119 | Line 138 | whowas_get_history(const char *nick, uin
138    return NULL;
139   }
140  
141 + /*! \brief For debugging. Counts related structures stored in whowas array
142 + */
143   void
144   whowas_count_memory(unsigned int *const count, size_t *const bytes)
145   {

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)