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

Comparing:
ircd-hybrid/modules/m_locops.c (file contents), Revision 31 by knight, Sun Oct 2 20:34:05 2005 UTC vs.
ircd-hybrid/trunk/modules/m_locops.c (file contents), Revision 1832 by michael, Fri Apr 19 19:16:09 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 "irc_string.h"
29   #include "numeric.h"
30   #include "send.h"
31 < #include "s_conf.h"
31 > #include "conf.h"
32   #include "s_user.h"
33   #include "s_serv.h"
34   #include "hash.h"
36 #include "msg.h"
35   #include "parse.h"
36   #include "modules.h"
37  
40 static void m_locops(struct Client *, struct Client *, int, char *[]);
41 static void ms_locops(struct Client *, struct Client *, int, char *[]);
42
43 struct Message locops_msgtab = {
44  "LOCOPS", 0, 0, 2, 0, MFLG_SLOW, 0,
45  { m_unregistered, m_not_oper, ms_locops, m_ignore, m_locops, m_ignore }
46 };
47
48 #ifndef STATIC_MODULES
49 void
50 _modinit(void)
51 {
52  mod_add_cmd(&locops_msgtab);
53 }
54
55 void
56 _moddeinit(void)
57 {
58  mod_del_cmd(&locops_msgtab);
59 }
60
61 const char *_version = "$Revision$";
62 #endif
38  
39   /*
40 < * m_locops - LOCOPS message handler
40 > * mo_locops - LOCOPS message handler
41   * (write to *all* local opers currently online)
42   *      parv[0] = sender prefix
43   *      parv[1] = message text
44   */
45   static void
46 < m_locops(struct Client *client_p, struct Client *source_p,
47 <         int parc, char *parv[])
46 > mo_locops(struct Client *client_p, struct Client *source_p,
47 >          int parc, char *parv[])
48   {
49    const char *message = parv[1];
50  
51    if (EmptyString(message))
52    {
53 <    sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
53 >    sendto_one(source_p, ERR_NEEDMOREPARAMS,
54                 me.name, source_p->name, "LOCOPS");
55      return;
56    }
# Line 93 | Line 68 | ms_locops(struct Client *client_p, struc
68    if (parc != 3 || EmptyString(parv[2]))
69      return;
70  
71 <  sendto_server(client_p, NULL, NULL, CAP_CLUSTER, 0, 0, "LOCOPS %s :%s",
71 >  sendto_server(client_p, CAP_CLUSTER, 0, "LOCOPS %s :%s",
72                  parv[1], parv[2]);
73  
74 <  if (!IsClient(source_p) || !match(parv[1], me.name))
74 >  if (!IsClient(source_p) || match(parv[1], me.name))
75      return;
76  
77 <  if (find_matching_name_conf(ULINE_TYPE, source_p->servptr->name,
77 >  if (find_matching_name_conf(CONF_ULINE, source_p->servptr->name,
78                                "*", "*", SHARED_LOCOPS))
79      sendto_wallops_flags(UMODE_LOCOPS, source_p, "SLOCOPS - %s", parv[2]);
80   }
81 +
82 + static struct Message locops_msgtab = {
83 +  "LOCOPS", 0, 0, 2, MAXPARA, MFLG_SLOW, 0,
84 +  { m_unregistered, m_not_oper, ms_locops, m_ignore, mo_locops, m_ignore }
85 + };
86 +
87 + static void
88 + module_init(void)
89 + {
90 +  mod_add_cmd(&locops_msgtab);
91 + }
92 +
93 + static void
94 + module_exit(void)
95 + {
96 +  mod_del_cmd(&locops_msgtab);
97 + }
98 +
99 + struct module module_entry = {
100 +  .node    = { NULL, NULL, NULL },
101 +  .name    = NULL,
102 +  .version = "$Revision$",
103 +  .handle  = NULL,
104 +  .modinit = module_init,
105 +  .modexit = module_exit,
106 +  .flags   = 0
107 + };

Comparing:
ircd-hybrid/modules/m_locops.c (property svn:keywords), Revision 31 by knight, Sun Oct 2 20:34:05 2005 UTC vs.
ircd-hybrid/trunk/modules/m_locops.c (property svn:keywords), Revision 1832 by michael, Fri Apr 19 19:16:09 2013 UTC

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

Diff Legend

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