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

Comparing:
ircd-hybrid-7.2/modules/m_users.c (file contents), Revision 435 by michael, Sat Feb 11 19:21:50 2006 UTC vs.
ircd-hybrid/trunk/modules/m_users.c (file contents), Revision 1836 by michael, Fri Apr 19 19:54:11 2013 UTC

# Line 23 | Line 23
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"
30 < #include "s_conf.h"
30 > #include "conf.h"
31   #include "send.h"
33 – #include "msg.h"
32   #include "parse.h"
33   #include "modules.h"
34  
37 – static void m_users(struct Client *, struct Client *, int, char *[]);
38 – static void mo_users(struct Client *, struct Client *, int, char *[]);
39 –
40 – struct Message users_msgtab = {
41 –  "USERS", 0, 0, 0, 0, MFLG_SLOW, 0,
42 –  { m_unregistered, m_users, mo_users, m_ignore, mo_users, m_ignore }
43 – };
44 –
45 – #ifndef STATIC_MODULES
46 – void
47 – _modinit(void)
48 – {
49 –  mod_add_cmd(&users_msgtab);
50 – }
51 –
52 – void
53 – _moddeinit(void)
54 – {
55 –  mod_del_cmd(&users_msgtab);
56 – }
57 –
58 – const char *_version = "$Revision$";
59 – #endif
35  
36   /*
37   * m_users
# Line 71 | Line 46 | m_users(struct Client *client_p, struct
46  
47    if (last_used + ConfigFileEntry.pace_wait_simple > CurrentTime)
48    {
49 <    sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, source_p->name);
49 >    sendto_one(source_p, form_str(RPL_LOAD2HI),
50 >               me.name, source_p->name);
51      return;
52    }
53  
# Line 84 | Line 60 | m_users(struct Client *client_p, struct
60  
61    sendto_one(source_p, form_str(RPL_LOCALUSERS), me.name, source_p->name,
62               ConfigServerHide.hide_servers ? Count.total : Count.local,
87 –             ConfigServerHide.hide_servers ? Count.max_tot : Count.max_loc,
88 –             ConfigServerHide.hide_servers ? Count.total : Count.local,
63               ConfigServerHide.hide_servers ? Count.max_tot : Count.max_loc);
90 –
64    sendto_one(source_p, form_str(RPL_GLOBALUSERS), me.name, source_p->name,
65 <             Count.total, Count.max_tot, Count.total, Count.max_tot);
65 >             Count.total, Count.max_tot);
66   }
67  
68   /*
# Line 105 | Line 78 | mo_users(struct Client *client_p, struct
78                    parc, parv) != HUNTED_ISME)
79      return;
80  
81 <  if (!IsOper(source_p) && ConfigServerHide.hide_servers)
81 >  if (!HasUMode(source_p, UMODE_OPER) && ConfigServerHide.hide_servers)
82      sendto_one(source_p, form_str(RPL_LOCALUSERS), me.name, source_p->name,
83 <               Count.total, Count.max_tot, Count.total, Count.max_tot);
83 >               Count.total, Count.max_tot);
84    else
85      sendto_one(source_p, form_str(RPL_LOCALUSERS), me.name, source_p->name,
86 <               Count.local, Count.max_loc, Count.local, Count.max_loc);
86 >               Count.local, Count.max_loc);
87  
88    sendto_one(source_p, form_str(RPL_GLOBALUSERS), me.name, source_p->name,
89 <             Count.total, Count.max_tot, Count.total, Count.max_tot);
89 >             Count.total, Count.max_tot);
90   }
91 +
92 + static struct Message users_msgtab = {
93 +  "USERS", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
94 +  { m_unregistered, m_users, mo_users, m_ignore, mo_users, m_ignore }
95 + };
96 +
97 + static void
98 + module_init(void)
99 + {
100 +  mod_add_cmd(&users_msgtab);
101 + }
102 +
103 + static void
104 + module_exit(void)
105 + {
106 +  mod_del_cmd(&users_msgtab);
107 + }
108 +
109 + struct module module_entry = {
110 +  .node    = { NULL, NULL, NULL },
111 +  .name    = NULL,
112 +  .version = "$Revision$",
113 +  .handle  = NULL,
114 +  .modinit = module_init,
115 +  .modexit = module_exit,
116 +  .flags   = 0
117 + };

Diff Legend

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