]> jfr.im git - solanum.git/blobdiff - modules/m_dline.c
Add AV2 descriptions to all m_c* modules.
[solanum.git] / modules / m_dline.c
index f67b0058377e602e128be593146bc54a7f02de39..fad28340e745b4ff8fd3a6281ca94cf8abb29a51 100644 (file)
@@ -20,8 +20,6 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
- *
- *  $Id$
  */
 
 #include "stdinc.h"
 #include "bandbi.h"
 #include "operhash.h"
 
-static int mo_dline(struct Client *, struct Client *, int, const char **);
-static int me_dline(struct Client *, struct Client *, int, const char **);
-static int mo_undline(struct Client *, struct Client *, int, const char **);
-static int me_undline(struct Client *, struct Client *, int, const char **);
+static int mo_dline(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int me_dline(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int mo_undline(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int me_undline(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
 
 struct Message dline_msgtab = {
-       "DLINE", 0, 0, 0, MFLG_SLOW,
+       "DLINE", 0, 0, 0, 0,
        {mg_unreg, mg_not_oper, mg_ignore, mg_ignore, {me_dline, 4}, {mo_dline, 2}}
 };
 
 struct Message undline_msgtab = {
-       "UNDLINE", 0, 0, 0, MFLG_SLOW,
+       "UNDLINE", 0, 0, 0, 0,
        {mg_unreg, mg_not_oper, mg_ignore, mg_ignore, {me_undline, 2}, {mo_undline, 2}}
 };
 
 mapi_clist_av1 dline_clist[] = { &dline_msgtab, &undline_msgtab, NULL };
 
-DECLARE_MODULE_AV1(dline, NULL, NULL, dline_clist, NULL, NULL, "$Revision$");
+DECLARE_MODULE_AV2(dline, NULL, NULL, dline_clist, NULL, NULL, NULL, NULL, NULL);
 
 static int remove_temp_dline(struct ConfItem *);
 static int apply_dline(struct Client *, const char *, int, char *);
 static int apply_undline(struct Client *, const char *);
 
 /* mo_dline()
- * 
+ *
  *   parv[1] - dline to add
  *   parv[2] - reason
  */
 static int
-mo_dline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+mo_dline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        char def[] = "No Reason";
        const char *dlhost;
@@ -142,7 +140,7 @@ mo_dline(struct Client *client_p, struct Client *source_p, int parc, const char
  *      parv[1] = dline to remove
  */
 static int
-mo_undline(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+mo_undline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        const char *cidr;
        const char *target_server = NULL;
@@ -178,7 +176,7 @@ mo_undline(struct Client *client_p, struct Client *source_p, int parc, const cha
 }
 
 static int
-me_dline(struct Client *client_p, struct Client *source_p, int parc, const char **parv)
+me_dline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char **parv)
 {
        int tdline_time = atoi(parv[1]);
        /* Since this is coming over a server link, assume that the originating
@@ -200,7 +198,7 @@ me_dline(struct Client *client_p, struct Client *source_p, int parc, const char
 }
 
 static int
-me_undline(struct Client *client_p, struct Client *source_p, int parc, const char **parv)
+me_undline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char **parv)
 {
        if(!IsPerson(source_p))
                return 0;
@@ -223,7 +221,7 @@ apply_dline(struct Client *source_p, const char *dlhost, int tdline_time, char *
        int t = AF_INET, ty, b;
        const char *creason;
 
-       ty = parse_netmask(dlhost, (struct sockaddr *) &daddr, &b);
+       ty = parse_netmask(dlhost, &daddr, &b);
        if(ty == HM_HOST)
        {
                sendto_one(source_p, ":%s NOTICE %s :Invalid D-Line", me.name, source_p->name);