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

Comparing ircd-hybrid-8/modules/m_links.c (file contents):
Revision 1229 by michael, Sun Sep 18 09:02:38 2011 UTC vs.
Revision 1230 by michael, Thu Sep 22 19:41:19 2011 UTC

# Line 36 | Line 36
36   #include "parse.h"
37   #include "modules.h"
38  
39 static void do_links(struct Client *, int, char *[]);
40 static void m_links(struct Client *, struct Client *, int, char *[]);
41 static void mo_links(struct Client *, struct Client *, int, char *[]);
42 static void ms_links(struct Client *, struct Client *, int, char *[]);
43
44 struct Message links_msgtab = {
45  "LINKS", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
46  {m_unregistered, m_links, ms_links, m_ignore, mo_links, m_ignore}
47 };
48
49 const char *_version = "$Revision$";
50
51 void
52 _modinit(void)
53 {
54  mod_add_cmd(&links_msgtab);
55 }
56
57 void
58 _moddeinit(void)
59 {
60  mod_del_cmd(&links_msgtab);
61 }
39  
40   static void
41   do_links(struct Client *source_p, int parc, char *parv[])
# Line 126 | Line 103 | do_links(struct Client *source_p, int pa
103    }
104   }
105  
106 + static void
107 + mo_links(struct Client *client_p, struct Client *source_p,
108 +         int parc, char *parv[])
109 + {
110 +  if (parc > 2)
111 +    if (!ConfigFileEntry.disable_remote || HasUMode(source_p, UMODE_OPER))
112 +      if (hunt_server(client_p, source_p, ":%s LINKS %s :%s", 1,
113 +                      parc, parv) != HUNTED_ISME)
114 +        return;
115 +
116 +  do_links(source_p, parc, parv);
117 + }
118 +
119   /*
120   * m_links - LINKS message handler
121   *      parv[0] = sender prefix
# Line 159 | Line 149 | m_links(struct Client *client_p, struct
149    do_links(source_p, parc, parv);
150   }
151  
162 static void
163 mo_links(struct Client *client_p, struct Client *source_p,
164         int parc, char *parv[])
165 {
166  if (parc > 2)
167    if (!ConfigFileEntry.disable_remote || HasUMode(source_p, UMODE_OPER))
168      if (hunt_server(client_p, source_p, ":%s LINKS %s :%s", 1,
169                      parc, parv) != HUNTED_ISME)
170        return;
171
172  do_links(source_p, parc, parv);
173 }
174
152   /*
153   * ms_links - LINKS message handler
154   *      parv[0] = sender prefix
# Line 192 | Line 169 | ms_links(struct Client *client_p, struct
169    if (IsClient(source_p))
170      m_links(client_p, source_p, parc, parv);
171   }
172 +
173 + static struct Message links_msgtab = {
174 +  "LINKS", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
175 +  {m_unregistered, m_links, ms_links, m_ignore, mo_links, m_ignore}
176 + };
177 +
178 + static void
179 + module_init(void)
180 + {
181 +  mod_add_cmd(&links_msgtab);
182 + }
183 +
184 + static void
185 + module_exit(void)
186 + {
187 +  mod_del_cmd(&links_msgtab);
188 + }
189 +
190 + struct module module_entry = {
191 +  .node    = { NULL, NULL, NULL },
192 +  .name    = NULL,
193 +  .version = "$Revision$",
194 +  .handle  = NULL,
195 +  .modinit = module_init,
196 +  .modexit = module_exit,
197 +  .flags   = 0
198 + };

Diff Legend

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