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

« back to all changes in this revision

Viewing changes to modules/m_links.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 m_links.c
23
23
 * \brief Includes required functions for processing the LINKS command.
24
 
 * \version $Id: m_links.c 4564 2014-08-24 10:24:47Z michael $
 
24
 * \version $Id: m_links.c 5582 2015-02-15 14:42:58Z michael $
25
25
 */
26
26
 
27
27
#include "stdinc.h"
32
32
#include "server.h"
33
33
#include "send.h"
34
34
#include "conf.h"
35
 
#include "motd.h"
36
35
#include "parse.h"
37
36
#include "modules.h"
38
37
 
45
44
static void
46
45
do_links(struct Client *source_p, int parc, char *parv[])
47
46
{
48
 
  dlink_node *ptr = NULL;
 
47
  dlink_node *node = NULL;
49
48
 
50
49
  sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
51
50
                       "LINKS requested by %s (%s@%s) [%s]",
57
56
  {
58
57
    const char *mask = (parc > 2 ? parv[2] : parv[1]);
59
58
 
60
 
    DLINK_FOREACH(ptr, global_server_list.head)
 
59
    DLINK_FOREACH(node, global_server_list.head)
61
60
    {
62
 
      struct Client *target_p = ptr->data;
 
61
      struct Client *target_p = node->data;
63
62
 
64
63
      /* skip hidden servers */
65
64
      if (IsHidden(target_p))
93
92
     */
94
93
    sendto_one_numeric(source_p, &me, RPL_LINKS, me.name, me.name, 0, me.info);
95
94
 
96
 
    DLINK_FOREACH(ptr, flatten_links.head)
97
 
      sendto_one_numeric(source_p, &me, RPL_LINKS|SND_EXPLICIT, "%s", ptr->data);
 
95
    DLINK_FOREACH(node, flatten_links.head)
 
96
      sendto_one_numeric(source_p, &me, RPL_LINKS | SND_EXPLICIT, "%s", node->data);
98
97
    sendto_one_numeric(source_p, &me, RPL_ENDOFLINKS, "*");
99
98
  }
100
99
}
134
133
 
135
134
  if ((last_used + ConfigGeneral.pace_wait) > CurrentTime)
136
135
  {
137
 
    sendto_one_numeric(source_p, &me, RPL_LOAD2HI);
 
136
    sendto_one_numeric(source_p, &me, RPL_LOAD2HI, "LINKS");
138
137
    return 0;
139
138
  }
140
139
 
165
164
static int
166
165
ms_links(struct Client *source_p, int parc, char *parv[])
167
166
{
168
 
  if (hunt_server(source_p, ":%s LINKS %s :%s", 1,
169
 
                  parc, parv) != HUNTED_ISME)
 
167
  if (hunt_server(source_p, ":%s LINKS %s :%s", 1, parc, parv) != HUNTED_ISME)
170
168
    return 0;
171
169
 
172
170
  return m_links(source_p, parc, parv);
194
192
{
195
193
  .node    = { NULL, NULL, NULL },
196
194
  .name    = NULL,
197
 
  .version = "$Revision: 4564 $",
 
195
  .version = "$Revision: 5582 $",
198
196
  .handle  = NULL,
199
197
  .modinit = module_init,
200
198
  .modexit = module_exit,