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-7.2/modules/m_lusers.c (file contents), Revision 885 by michael, Wed Oct 31 18:09:24 2007 UTC vs.
ircd-hybrid-8/modules/m_lusers.c (file contents), Revision 1230 by michael, Thu Sep 22 19:41:19 2011 UTC

# Line 35 | Line 35
35   #include "parse.h"
36   #include "modules.h"
37  
38 – static void m_lusers(struct Client*, struct Client*, int, char**);
39 – static void ms_lusers(struct Client*, struct Client*, int, char**);
40 –
41 – struct Message lusers_msgtab = {
42 –  "LUSERS", 0, 0, 0, 0, MFLG_SLOW, 0,
43 –  {m_unregistered, m_lusers, ms_lusers, m_ignore, ms_lusers, m_ignore}
44 – };
45 –
46 – #ifndef STATIC_MODULES
47 – void
48 – _modinit(void)
49 – {
50 –  mod_add_cmd(&lusers_msgtab);
51 – }
52 –
53 – void
54 – _moddeinit(void)
55 – {
56 –  mod_del_cmd(&lusers_msgtab);
57 – }
58 –
59 – const char *_version = "$Revision$";
60 – #endif
38  
39   /* m_lusers - LUSERS message handler
40   * parv[0] = sender
# Line 71 | Line 48 | const char *_version = "$Revision$";
48   */
49   static void
50   m_lusers(struct Client *client_p, struct Client *source_p,
51 <         int parc, char *parv[])
51 >         int parc, char *parv[])
52   {
53    static time_t last_used = 0;
54  
55    if ((last_used + ConfigFileEntry.pace_wait_simple) > CurrentTime)
56    {
57      /* safe enough to give this on a local connect only */
58 <    if (MyClient(source_p))
82 <      sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, parv[0]);
58 >    sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, source_p->name);
59      return;
60    }
61 <  else
62 <    last_used = CurrentTime;
61 >
62 >  last_used = CurrentTime;
63  
64    if (parc > 2 && !ConfigFileEntry.disable_remote)
65 <  {  
66 <    if (hunt_server(client_p, source_p, ":%s LUSERS %s :%s", 2, parc, parv) != HUNTED_ISME)
65 >    if (hunt_server(client_p, source_p, ":%s LUSERS %s :%s", 2,
66 >                    parc, parv) != HUNTED_ISME)
67        return;
92 –  }
68  
69    show_lusers(source_p);
70   }
# Line 101 | Line 76 | m_lusers(struct Client *client_p, struct
76   */
77   static void
78   ms_lusers(struct Client *client_p, struct Client *source_p,
79 <          int parc, char *parv[])
79 >          int parc, char *parv[])
80   {
81    if (parc > 2)
82 <  {
83 <    if(hunt_server(client_p, source_p, ":%s LUSERS %s :%s", 2, parc, parv)
109 <     != HUNTED_ISME)
82 >    if (hunt_server(client_p, source_p, ":%s LUSERS %s :%s", 2,
83 >                    parc, parv) != HUNTED_ISME)
84          return;
111 –  }
85  
86    if (IsClient(source_p))
87      show_lusers(source_p);
88   }
89 +
90 + static struct Message lusers_msgtab = {
91 +  "LUSERS", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
92 +  {m_unregistered, m_lusers, ms_lusers, m_ignore, ms_lusers, m_ignore}
93 + };
94 +
95 + static void
96 + module_init(void)
97 + {
98 +  mod_add_cmd(&lusers_msgtab);
99 + }
100 +
101 + static void
102 + module_exit(void)
103 + {
104 +  mod_del_cmd(&lusers_msgtab);
105 + }
106 +
107 + struct module module_entry = {
108 +  .node    = { NULL, NULL, NULL },
109 +  .name    = NULL,
110 +  .version = "$Revision$",
111 +  .handle  = NULL,
112 +  .modinit = module_init,
113 +  .modexit = module_exit,
114 +  .flags   = 0
115 + };

Diff Legend

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