/[svn]/ircd-hybrid-8/modules/m_services.c
ViewVC logotype

Diff of /ircd-hybrid-8/modules/m_services.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1218 by michael, Fri Sep 16 08:42:03 2011 UTC revision 1230 by michael, Thu Sep 22 19:41:19 2011 UTC
# Line 42  Line 42 
42  #include "hash.h"  #include "hash.h"
43    
44    
 static void m_botserv(struct Client *, struct Client *, int, char *[]);  
 static void m_chanserv(struct Client *, struct Client *, int, char *[]);  
 static void m_memoserv(struct Client *, struct Client *, int, char *[]);  
 static void m_nickserv(struct Client *, struct Client *, int, char *[]);  
 static void m_operserv(struct Client *, struct Client *, int, char *[]);  
 static void m_statserv(struct Client *, struct Client *, int, char *[]);  
 static void m_helpserv(struct Client *, struct Client *, int, char *[]);  
 static void m_identify(struct Client *, struct Client *, int, char *[]);  
   
 struct Message ms_msgtab = {  
   "MS", 0, 0, 0, 1, MFLG_SLOW, 0,  
   {m_unregistered, m_memoserv, m_ignore, m_ignore, m_memoserv, m_ignore}  
 };  
   
 struct Message ns_msgtab = {  
   "NS", 0, 0, 0, 1, MFLG_SLOW, 0,  
   {m_unregistered, m_nickserv, m_ignore, m_ignore, m_nickserv, m_ignore}  
 };  
   
 struct Message os_msgtab = {  
   "OS", 0, 0, 0, 1, MFLG_SLOW, 0,  
   {m_unregistered, m_operserv, m_ignore, m_ignore, m_operserv, m_ignore}  
 };  
   
 struct Message bs_msgtab = {  
   "BS", 0, 0, 0, 1, MFLG_SLOW, 0,  
   {m_unregistered, m_botserv, m_ignore, m_ignore, m_botserv, m_ignore}  
 };  
   
 struct Message cs_msgtab = {  
   "CS", 0, 0, 0, 1, MFLG_SLOW, 0,  
   {m_unregistered, m_chanserv, m_ignore, m_ignore, m_chanserv, m_ignore}  
 };  
   
 struct Message ss_msgtab = {  
   "SS", 0, 0, 0, 1, MFLG_SLOW, 0,  
   {m_unregistered, m_statserv, m_ignore, m_ignore, m_statserv, m_ignore}  
 };  
   
 struct Message hs_msgtab = {  
   "HS", 0, 0, 0, 1, MFLG_SLOW, 0,  
   {m_unregistered, m_helpserv, m_ignore, m_ignore, m_helpserv, m_ignore}  
 };  
   
 struct Message botserv_msgtab = {  
   "BOTSERV", 0, 0, 0, 1, MFLG_SLOW, 0,  
   {m_unregistered, m_botserv, m_ignore, m_ignore, m_botserv, m_ignore}  
 };  
   
 struct Message chanserv_msgtab = {  
   "CHANSERV", 0, 0, 0, 1, MFLG_SLOW, 0,  
   {m_unregistered, m_chanserv, m_ignore, m_ignore, m_chanserv, m_ignore}  
 };  
   
 struct Message memoserv_msgtab = {  
   "MEMOSERV", 0, 0, 0, 1, MFLG_SLOW, 0,  
   {m_unregistered, m_memoserv, m_ignore, m_ignore, m_memoserv, m_ignore}  
 };  
   
 struct Message nickserv_msgtab = {  
   "NICKSERV", 0, 0, 0, 1, MFLG_SLOW, 0,  
   {m_unregistered, m_nickserv, m_ignore, m_ignore, m_nickserv, m_ignore}  
 };  
   
 struct Message operserv_msgtab = {  
   "OPERSERV", 0, 0, 0, 1, MFLG_SLOW, 0,  
   {m_unregistered, m_operserv, m_ignore, m_ignore, m_operserv, m_ignore}  
 };  
   
 struct Message statserv_msgtab = {  
   "STATSERV", 0, 0, 0, 1, MFLG_SLOW, 0,  
   {m_unregistered, m_statserv, m_ignore, m_ignore, m_statserv, m_ignore}  
 };  
   
 struct Message helpserv_msgtab = {  
   "HELPSERV", 0, 0, 0, 1, MFLG_SLOW, 0,  
   {m_unregistered, m_helpserv, m_ignore, m_ignore, m_helpserv, m_ignore}  
 };  
   
 struct Message identify_msgtab = {  
   "IDENTIFY", 0, 0, 0, 1, MFLG_SLOW, 0,  
   {m_unregistered, m_identify, m_ignore, m_ignore, m_identify, m_ignore}  
 };  
   
 void  
 _modinit(void)  
 {  
   mod_add_cmd(&botserv_msgtab);  
   mod_add_cmd(&chanserv_msgtab);  
   mod_add_cmd(&memoserv_msgtab);  
   mod_add_cmd(&nickserv_msgtab);  
   mod_add_cmd(&operserv_msgtab);  
   mod_add_cmd(&statserv_msgtab);  
   mod_add_cmd(&helpserv_msgtab);  
   mod_add_cmd(&identify_msgtab);  
   mod_add_cmd(&bs_msgtab);  
   mod_add_cmd(&ns_msgtab);  
   mod_add_cmd(&cs_msgtab);  
   mod_add_cmd(&ms_msgtab);  
   mod_add_cmd(&os_msgtab);  
   mod_add_cmd(&ss_msgtab);  
   mod_add_cmd(&hs_msgtab);  
 }  
   
 void  
 _moddeinit(void)  
 {  
   mod_del_cmd(&botserv_msgtab);  
   mod_del_cmd(&chanserv_msgtab);  
   mod_del_cmd(&memoserv_msgtab);  
   mod_del_cmd(&nickserv_msgtab);  
   mod_del_cmd(&operserv_msgtab);  
   mod_del_cmd(&statserv_msgtab);  
   mod_del_cmd(&helpserv_msgtab);  
   mod_del_cmd(&identify_msgtab);  
   mod_del_cmd(&bs_msgtab);  
   mod_del_cmd(&ns_msgtab);  
   mod_del_cmd(&cs_msgtab);  
   mod_del_cmd(&ms_msgtab);  
   mod_del_cmd(&os_msgtab);  
   mod_del_cmd(&ss_msgtab);  
   mod_del_cmd(&hs_msgtab);  
 }  
   
 const char *_version = "$Revision$";  
   
45  /*  /*
46   * XXX: Each services alias handler is currently ugly copy&paste.   * XXX: Each services alias handler is currently ugly copy&paste.
47   * Configureable aliases will get implemented.   * Configureable aliases will get implemented.
# Line 394  m_identify(struct Client *client_p, stru Line 268  m_identify(struct Client *client_p, stru
268                   me.name, source_p->name, "NickServ");                   me.name, source_p->name, "NickServ");
269    }    }
270  }  }
271    
272    static struct Message ms_msgtab = {
273      "MS", 0, 0, 0, 1, MFLG_SLOW, 0,
274      {m_unregistered, m_memoserv, m_ignore, m_ignore, m_memoserv, m_ignore}
275    };
276    
277    static struct Message ns_msgtab = {
278      "NS", 0, 0, 0, 1, MFLG_SLOW, 0,
279      {m_unregistered, m_nickserv, m_ignore, m_ignore, m_nickserv, m_ignore}
280    };
281    
282    static struct Message os_msgtab = {
283      "OS", 0, 0, 0, 1, MFLG_SLOW, 0,
284      {m_unregistered, m_operserv, m_ignore, m_ignore, m_operserv, m_ignore}
285    };
286    
287    static struct Message bs_msgtab = {
288      "BS", 0, 0, 0, 1, MFLG_SLOW, 0,
289      {m_unregistered, m_botserv, m_ignore, m_ignore, m_botserv, m_ignore}
290    };
291    
292    static struct Message cs_msgtab = {
293      "CS", 0, 0, 0, 1, MFLG_SLOW, 0,
294      {m_unregistered, m_chanserv, m_ignore, m_ignore, m_chanserv, m_ignore}
295    };
296    
297    static struct Message ss_msgtab = {
298      "SS", 0, 0, 0, 1, MFLG_SLOW, 0,
299      {m_unregistered, m_statserv, m_ignore, m_ignore, m_statserv, m_ignore}
300    };
301    
302    static struct Message hs_msgtab = {
303      "HS", 0, 0, 0, 1, MFLG_SLOW, 0,
304      {m_unregistered, m_helpserv, m_ignore, m_ignore, m_helpserv, m_ignore}
305    };
306    
307    static struct Message botserv_msgtab = {
308      "BOTSERV", 0, 0, 0, 1, MFLG_SLOW, 0,
309      {m_unregistered, m_botserv, m_ignore, m_ignore, m_botserv, m_ignore}
310    };
311    
312    static struct Message chanserv_msgtab = {
313      "CHANSERV", 0, 0, 0, 1, MFLG_SLOW, 0,
314      {m_unregistered, m_chanserv, m_ignore, m_ignore, m_chanserv, m_ignore}
315    };
316    
317    static struct Message memoserv_msgtab = {
318      "MEMOSERV", 0, 0, 0, 1, MFLG_SLOW, 0,
319      {m_unregistered, m_memoserv, m_ignore, m_ignore, m_memoserv, m_ignore}
320    };
321    
322    static struct Message nickserv_msgtab = {
323      "NICKSERV", 0, 0, 0, 1, MFLG_SLOW, 0,
324      {m_unregistered, m_nickserv, m_ignore, m_ignore, m_nickserv, m_ignore}
325    };
326    
327    static struct Message operserv_msgtab = {
328      "OPERSERV", 0, 0, 0, 1, MFLG_SLOW, 0,
329      {m_unregistered, m_operserv, m_ignore, m_ignore, m_operserv, m_ignore}
330    };
331    
332    static struct Message statserv_msgtab = {
333      "STATSERV", 0, 0, 0, 1, MFLG_SLOW, 0,
334      {m_unregistered, m_statserv, m_ignore, m_ignore, m_statserv, m_ignore}
335    };
336    
337    static struct Message helpserv_msgtab = {
338      "HELPSERV", 0, 0, 0, 1, MFLG_SLOW, 0,
339      {m_unregistered, m_helpserv, m_ignore, m_ignore, m_helpserv, m_ignore}
340    };
341    
342    static struct Message identify_msgtab = {
343      "IDENTIFY", 0, 0, 0, 1, MFLG_SLOW, 0,
344      {m_unregistered, m_identify, m_ignore, m_ignore, m_identify, m_ignore}
345    };
346    
347    static void
348    module_init(void)
349    {
350      mod_add_cmd(&botserv_msgtab);
351      mod_add_cmd(&chanserv_msgtab);
352      mod_add_cmd(&memoserv_msgtab);
353      mod_add_cmd(&nickserv_msgtab);
354      mod_add_cmd(&operserv_msgtab);
355      mod_add_cmd(&statserv_msgtab);
356      mod_add_cmd(&helpserv_msgtab);
357      mod_add_cmd(&identify_msgtab);
358      mod_add_cmd(&bs_msgtab);
359      mod_add_cmd(&ns_msgtab);
360      mod_add_cmd(&cs_msgtab);
361      mod_add_cmd(&ms_msgtab);
362      mod_add_cmd(&os_msgtab);
363      mod_add_cmd(&ss_msgtab);
364      mod_add_cmd(&hs_msgtab);
365    }
366    
367    static void
368    module_exit(void)
369    {
370      mod_del_cmd(&botserv_msgtab);
371      mod_del_cmd(&chanserv_msgtab);
372      mod_del_cmd(&memoserv_msgtab);
373      mod_del_cmd(&nickserv_msgtab);
374      mod_del_cmd(&operserv_msgtab);
375      mod_del_cmd(&statserv_msgtab);
376      mod_del_cmd(&helpserv_msgtab);
377      mod_del_cmd(&identify_msgtab);
378      mod_del_cmd(&bs_msgtab);
379      mod_del_cmd(&ns_msgtab);
380      mod_del_cmd(&cs_msgtab);
381      mod_del_cmd(&ms_msgtab);
382      mod_del_cmd(&os_msgtab);
383      mod_del_cmd(&ss_msgtab);
384      mod_del_cmd(&hs_msgtab);
385    }
386    
387    struct module module_entry = {
388      .node    = { NULL, NULL, NULL },
389      .name    = NULL,
390      .version = "$Revision$",
391      .handle  = NULL,
392      .modinit = module_init,
393      .modexit = module_exit,
394      .flags   = MODULE_FLAG_CORE
395    };

Legend:
Removed from v.1218  
changed lines
  Added in v.1230

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28