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

Comparing:
ircd-hybrid-8/modules/m_operwall.c (file contents), Revision 1178 by michael, Mon Aug 15 08:11:31 2011 UTC vs.
ircd-hybrid/trunk/modules/m_operwall.c (file contents), Revision 1834 by michael, Fri Apr 19 19:50:27 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_user.h"
33 – #include "msg.h"
32   #include "parse.h"
33   #include "modules.h"
34   #include "s_serv.h"
35  
38 – static void mo_operwall(struct Client *, struct Client *, int, char *[]);
39 – static void ms_operwall(struct Client *, struct Client *, int, char *[]);
40 – static void me_operwall(struct Client *, struct Client *, int, char *[]);
41 –
42 – struct Message operwall_msgtab = {
43 –  "OPERWALL", 0, 0, 2, MAXPARA, MFLG_SLOW, 0,
44 –  {m_unregistered, m_not_oper, ms_operwall, me_operwall, mo_operwall, m_ignore}
45 – };
46 –
47 – void
48 – _modinit(void)
49 – {
50 –  mod_add_cmd(&operwall_msgtab);
51 – }
52 –
53 – void
54 – _moddeinit(void)
55 – {
56 –  mod_del_cmd(&operwall_msgtab);
57 – }
58 –
59 – const char *_version = "$Revision$";
60 –
36  
37   /*
38   * mo_operwall - OPERWALL message handler
# Line 71 | Line 46 | mo_operwall(struct Client *client_p, str
46   {
47    const char *message = parv[1];
48  
49 <  if (!IsOperWall(source_p))
49 >  if (!HasOFlag(source_p, OPER_FLAG_OPERWALL))
50    {
51      sendto_one(source_p, form_str(ERR_NOPRIVS),
52                 me.name, source_p->name, "operwall");
# Line 85 | Line 60 | mo_operwall(struct Client *client_p, str
60      return;
61    }
62  
63 <  sendto_server(NULL, NULL, CAP_TS6, NOCAPS,
63 >  sendto_server(NULL, CAP_TS6, NOCAPS,
64                  ":%s OPERWALL :%s", ID(source_p), message);
65 <  sendto_server(NULL, NULL, NOCAPS, CAP_TS6,
65 >  sendto_server(NULL, NOCAPS, CAP_TS6,
66                  ":%s OPERWALL :%s", source_p->name, message);
67    sendto_wallops_flags(UMODE_OPERWALL, source_p, "OPERWALL - %s", message);
68   }
# Line 107 | Line 82 | ms_operwall(struct Client *client_p, str
82    if (EmptyString(message))
83      return;
84  
85 <  sendto_server(client_p, NULL, CAP_TS6, NOCAPS, ":%s OPERWALL :%s",
85 >  sendto_server(client_p, CAP_TS6, NOCAPS, ":%s OPERWALL :%s",
86                  ID(source_p), message);
87 <  sendto_server(client_p, NULL, NOCAPS, CAP_TS6, ":%s OPERWALL :%s",
87 >  sendto_server(client_p, NOCAPS, CAP_TS6, ":%s OPERWALL :%s",
88                  source_p->name, message);
89    sendto_wallops_flags(UMODE_OPERWALL, source_p, "OPERWALL - %s", message);
90   }
# Line 133 | Line 108 | me_operwall(struct Client *client_p, str
108  
109    sendto_wallops_flags(UMODE_OPERWALL, source_p, "OPERWALL - %s", message);
110   }
111 +
112 + static struct Message operwall_msgtab = {
113 +  "OPERWALL", 0, 0, 2, MAXPARA, MFLG_SLOW, 0,
114 +  {m_unregistered, m_not_oper, ms_operwall, me_operwall, mo_operwall, m_ignore}
115 + };
116 +
117 + static void
118 + module_init(void)
119 + {
120 +  mod_add_cmd(&operwall_msgtab);
121 + }
122 +
123 + static void
124 + module_exit(void)
125 + {
126 +  mod_del_cmd(&operwall_msgtab);
127 + }
128 +
129 + struct module module_entry = {
130 +  .node    = { NULL, NULL, NULL },
131 +  .name    = NULL,
132 +  .version = "$Revision$",
133 +  .handle  = NULL,
134 +  .modinit = module_init,
135 +  .modexit = module_exit,
136 +  .flags   = 0
137 + };

Diff Legend

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