ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_lusers.c
(Generate patch)

Comparing:
ircd-hybrid/modules/m_lusers.c (file contents), Revision 30 by adx, Sun Oct 2 20:03:27 2005 UTC vs.
ircd-hybrid/trunk/modules/m_lusers.c (file contents), Revision 1592 by michael, Sat Oct 27 21:02:32 2012 UTC

# Line 19 | Line 19
19   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
20   *  USA
21   *
22 < *  $Id: m_lusers.c,v 1.28 2004/07/08 00:27:22 erik Exp $
22 > *  $Id$
23   */
24  
25   #include "stdinc.h"
26 – #include "handlers.h"
26   #include "client.h"
27   #include "ircd.h"
28   #include "numeric.h"
29   #include "s_serv.h"    /* hunt_server */
30   #include "s_user.h"    /* show_lusers */
31   #include "send.h"
32 < #include "s_conf.h"
34 < #include "msg.h"
32 > #include "conf.h"
33   #include "parse.h"
34   #include "modules.h"
35  
38 – /* XXX LazyLinks ? */
36  
40 – static void m_lusers(struct Client*, struct Client*, int, char**);
41 – static void ms_lusers(struct Client*, struct Client*, int, char**);
42 –
43 – struct Message lusers_msgtab = {
44 –  "LUSERS", 0, 0, 0, 0, MFLG_SLOW, 0,
45 –  {m_unregistered, m_lusers, ms_lusers, m_ignore, ms_lusers, m_ignore}
46 – };
47 – #ifndef STATIC_MODULES
48 –
49 – void
50 – _modinit(void)
51 – {
52 –  mod_add_cmd(&lusers_msgtab);
53 – }
54 –
55 – void
56 – _moddeinit(void)
57 – {
58 –  mod_del_cmd(&lusers_msgtab);
59 – }
60 –
61 – const char *_version = "$Revision: 1.28 $";
62 – #endif
37   /* m_lusers - LUSERS message handler
38   * parv[0] = sender
39   * parv[1] = host/server mask.
# Line 72 | Line 46 | const char *_version = "$Revision: 1.28
46   */
47   static void
48   m_lusers(struct Client *client_p, struct Client *source_p,
49 <         int parc, char *parv[])
49 >         int parc, char *parv[])
50   {
51    static time_t last_used = 0;
52  
53 <  if ((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
53 >  if ((last_used + ConfigFileEntry.pace_wait_simple) > CurrentTime)
54    {
55      /* safe enough to give this on a local connect only */
56 <    if (MyClient(source_p))
83 <      sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, parv[0]);
56 >    sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, source_p->name);
57      return;
58    }
59 <  else
60 <    last_used = CurrentTime;
59 >
60 >  last_used = CurrentTime;
61  
62    if (parc > 2 && !ConfigFileEntry.disable_remote)
63 <  {  
64 <    if (hunt_server(client_p, source_p, ":%s LUSERS %s :%s", 2, parc, parv) != HUNTED_ISME)
63 >    if (hunt_server(client_p, source_p, ":%s LUSERS %s :%s", 2,
64 >                    parc, parv) != HUNTED_ISME)
65        return;
93 –  }
66  
67    show_lusers(source_p);
68   }
# Line 102 | Line 74 | m_lusers(struct Client *client_p, struct
74   */
75   static void
76   ms_lusers(struct Client *client_p, struct Client *source_p,
77 <          int parc, char *parv[])
77 >          int parc, char *parv[])
78   {
79    if (parc > 2)
80 <  {
81 <    if(hunt_server(client_p, source_p, ":%s LUSERS %s :%s", 2, parc, parv)
110 <     != HUNTED_ISME)
80 >    if (hunt_server(client_p, source_p, ":%s LUSERS %s :%s", 2,
81 >                    parc, parv) != HUNTED_ISME)
82          return;
112 –  }
83  
84 <  if(IsClient(source_p))
84 >  if (IsClient(source_p))
85      show_lusers(source_p);
86   }
87 +
88 + static struct Message lusers_msgtab = {
89 +  "LUSERS", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
90 +  {m_unregistered, m_lusers, ms_lusers, m_ignore, ms_lusers, m_ignore}
91 + };
92 +
93 + static void
94 + module_init(void)
95 + {
96 +  mod_add_cmd(&lusers_msgtab);
97 + }
98 +
99 + static void
100 + module_exit(void)
101 + {
102 +  mod_del_cmd(&lusers_msgtab);
103 + }
104 +
105 + struct module module_entry = {
106 +  .node    = { NULL, NULL, NULL },
107 +  .name    = NULL,
108 +  .version = "$Revision$",
109 +  .handle  = NULL,
110 +  .modinit = module_init,
111 +  .modexit = module_exit,
112 +  .flags   = 0
113 + };

Comparing:
ircd-hybrid/modules/m_lusers.c (property svn:keywords), Revision 30 by adx, Sun Oct 2 20:03:27 2005 UTC vs.
ircd-hybrid/trunk/modules/m_lusers.c (property svn:keywords), Revision 1592 by michael, Sat Oct 27 21:02:32 2012 UTC

# Line 1 | Line 1
1 < "Id Revision"
1 > Id Revision

Diff Legend

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