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

Diff of /ircd-hybrid/modules/m_gline.c

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

revision 933 by adx, Wed Aug 30 16:54:25 2006 UTC revision 934 by db, Wed Apr 8 20:34:38 2009 UTC
# Line 66  static void do_sgline(struct Client *, s Line 66  static void do_sgline(struct Client *, s
66  static void me_gline(struct Client *, struct Client *, int, char *[]);  static void me_gline(struct Client *, struct Client *, int, char *[]);
67  static void ms_gline(struct Client *, struct Client *, int, char *[]);  static void ms_gline(struct Client *, struct Client *, int, char *[]);
68  static void mo_gline(struct Client *, struct Client *, int, char *[]);  static void mo_gline(struct Client *, struct Client *, int, char *[]);
 static void mo_ungline(struct Client *, struct Client *, int, char *[]);  
69    
70  /*  /*
71   * gline enforces 3 parameters to force operator to give a reason   * gline enforces 3 parameters to force operator to give a reason
# Line 78  struct Message gline_msgtab = { Line 77  struct Message gline_msgtab = {
77    { m_unregistered, m_not_oper, ms_gline, me_gline, mo_gline, m_ignore }    { m_unregistered, m_not_oper, ms_gline, me_gline, mo_gline, m_ignore }
78  };  };
79    
 struct Message ungline_msgtab = {  
   "UNGLINE", 0, 0, 2, 0, MFLG_SLOW, 0,  
   { m_unregistered, m_not_oper, m_ignore, m_ignore, mo_ungline, m_ignore }  
 };  
80    
81  INIT_MODULE(m_gline, "$Revision$")  INIT_MODULE(m_gline, "$Revision$")
82  {  {
83    mod_add_cmd(&gline_msgtab);    mod_add_cmd(&gline_msgtab);
   mod_add_cmd(&ungline_msgtab);  
84    add_capability("GLN", CAP_GLN, 1);    add_capability("GLN", CAP_GLN, 1);
85    
86    eventAddIsh("expire_pending_glines",    eventAddIsh("expire_pending_glines",
# Line 96  INIT_MODULE(m_gline, "$Revision$") Line 90  INIT_MODULE(m_gline, "$Revision$")
90  CLEANUP_MODULE  CLEANUP_MODULE
91  {  {
92    delete_capability("GLN");    delete_capability("GLN");
   mod_del_cmd(&ungline_msgtab);  
93    mod_del_cmd(&gline_msgtab);    mod_del_cmd(&gline_msgtab);
94    
95    eventDelete(expire_pending_glines, NULL);    eventDelete(expire_pending_glines, NULL);
# Line 576  remove_gline_match(const char *user, con Line 569  remove_gline_match(const char *user, con
569    return !!conf;    return !!conf;
570  }  }
571    
 /*  
  * m_ungline  
  * added May 29th 2000 by Toby Verrall <toot@melnet.co.uk>  
  * added to hybrid-7 7/11/2000 --is  
  *  
  *      parv[0] = sender nick  
  *      parv[1] = gline to remove  
  */  
 static void  
 mo_ungline(struct Client *client_p, struct Client *source_p,  
            int parc, char *parv[])  
 {  
   char *user = NULL, *host = NULL;  
   
   if (!enable_glines)  
   {  
     sendto_one(source_p, ":%s NOTICE %s :UNGLINE disabled",  
                me.name, source_p->name);  
     return;  
   }  
   
   if (!IsOperUnkline(source_p) || !IsOperGline(source_p))  
   {  
     sendto_one(source_p, form_str(ERR_NOPRIVS),  
                me.name, source_p->name, "gline");  
     return;  
   }  
   
   if (parse_aline("UNGLINE", source_p, parc, parv,  
                   0, &user, &host, NULL, NULL, NULL) < 0)  
     return;  
   
   if (remove_gline_match(user, host))  
   {  
     sendto_one(source_p, ":%s NOTICE %s :G-Line for [%s@%s] is removed",  
                me.name, source_p->name, user, host);  
     sendto_realops_flags(UMODE_ALL, L_ALL,  
                          "%s has removed the G-Line for: [%s@%s]",  
                          get_oper_name(source_p), user, host);  
     ilog(L_NOTICE, "%s removed G-Line for [%s@%s]",  
          get_oper_name(source_p), user, host);  
     return;  
   }  
   
   sendto_one(source_p, ":%s NOTICE %s :No G-Line for %s@%s",  
              me.name, source_p->name, user, host);  
 }  

Legend:
Removed from v.933  
changed lines
  Added in v.934

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