~ubuntu-branches/debian/sid/ircd-hybrid/sid

« back to all changes in this revision

Viewing changes to src/whowas.c

  • Committer: Package Import Robot
  • Author(s): Dominic Hargreaves
  • Date: 2015-04-19 15:53:09 UTC
  • mfrom: (1.2.13)
  • Revision ID: package-import@ubuntu.com-20150419155309-06y59x2at2ax5ou3
Tags: 1:8.2.7+dfsg.1-1
* Remove Suggests: hybserv since it doesn't really work with
  ircd-hybrid 8 and above
* New upstream release
  - update debian/copyright with minor changes
  - update config files from new reference.conf
  - fixes DoS from localhost clients (Closes: #782859)
  - supports SSL certficate chaining (Closes: #769741)
* Debconf configuration script no longer ignores the result of
  upgrade questions (Closes: #779082)
* Don't display upgrade warnings on new installs (Closes: #782883)
* Add NEWS item about updated configuration

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3
3
 *
4
 
 *  Copyright (c) 1997-2014 ircd-hybrid development team
 
4
 *  Copyright (c) 1997-2015 ircd-hybrid development team
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
21
21
 
22
22
/*! \file whowas.c
23
23
 * \brief WHOWAS user cache.
24
 
 * \version $Id: whowas.c 4564 2014-08-24 10:24:47Z michael $
 
24
 * \version $Id: whowas.c 5630 2015-03-01 12:18:47Z michael $
25
25
 */
26
26
 
27
27
#include "stdinc.h"
67
67
  who->shide = IsHidden(client_p->servptr) != 0;
68
68
  who->logoff = CurrentTime;
69
69
 
 
70
  strlcpy(who->account, client_p->account, sizeof(who->account));
70
71
  strlcpy(who->name, client_p->name, sizeof(who->name));
71
72
  strlcpy(who->username, client_p->username, sizeof(who->username));
72
73
  strlcpy(who->hostname, client_p->host, sizeof(who->hostname));
 
74
  strlcpy(who->sockhost, client_p->sockhost, sizeof(who->sockhost));
73
75
  strlcpy(who->realname, client_p->info, sizeof(who->realname));
74
76
  strlcpy(who->servername, client_p->servptr->name, sizeof(who->servername));
75
77
 
87
89
void
88
90
whowas_off_history(struct Client *client_p)
89
91
{
90
 
  dlink_node *ptr = NULL, *ptr_next = NULL;
 
92
  dlink_node *node = NULL, *node_next = NULL;
91
93
 
92
 
  DLINK_FOREACH_SAFE(ptr, ptr_next, client_p->whowas.head)
 
94
  DLINK_FOREACH_SAFE(node, node_next, client_p->whowas.head)
93
95
  {
94
 
    struct Whowas *temp = ptr->data;
 
96
    struct Whowas *temp = node->data;
95
97
 
96
98
    temp->online = NULL;
97
99
    dlinkDelete(&temp->cnode, &client_p->whowas);
101
103
struct Client *
102
104
whowas_get_history(const char *nick, time_t timelimit)
103
105
{
104
 
  dlink_node *ptr = NULL;
 
106
  dlink_node *node = NULL;
105
107
 
106
108
  timelimit = CurrentTime - timelimit;
107
109
 
108
 
  DLINK_FOREACH(ptr, WHOWASHASH[strhash(nick)].head)
 
110
  DLINK_FOREACH(node, WHOWASHASH[strhash(nick)].head)
109
111
  {
110
 
    struct Whowas *temp = ptr->data;
 
112
    struct Whowas *temp = node->data;
111
113
 
112
114
    if (temp->logoff < timelimit)
113
115
      continue;