]> jfr.im git - solanum.git/blobdiff - modules/m_accept.c
m_cap: Try to append caps even if one is too long
[solanum.git] / modules / m_accept.c
index a0a47fd1d15204b82e6f3005239dd4ea0963b961..cd3074b546d6bec1fb6edd9acdd5e340ed47e55b 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: m_accept.c 254 2005-09-21 23:35:12Z nenolod $
  */
 
 #include "stdinc.h"
 #include "parse.h"
 #include "modules.h"
 
-static int m_accept(struct Client *, struct Client *, int, const char **);
+static const char accept_desc[] =
+       "Provides the ACCEPT command for use with Caller ID/user mode +g";
+
+static void m_accept(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
 static void build_nicklist(struct Client *, char *, char *, const char *);
 
 static void add_accept(struct Client *, struct Client *);
 static void list_accepts(struct Client *);
 
 struct Message accept_msgtab = {
-       "ACCEPT", 0, 0, 0, MFLG_SLOW | MFLG_UNREG,
+       "ACCEPT", 0, 0, 0, 0,
        {mg_unreg, {m_accept, 2}, mg_ignore, mg_ignore, mg_ignore, {m_accept, 2}}
 };
 
 mapi_clist_av1 accept_clist[] = {
        &accept_msgtab, NULL
 };
-DECLARE_MODULE_AV1(accept, NULL, NULL, accept_clist, NULL, NULL, "$Revision: 254 $");
+
+DECLARE_MODULE_AV2(accept, NULL, NULL, accept_clist, NULL, NULL, NULL, NULL, accept_desc);
 
 /*
  * m_accept - ACCEPT command handler
  *      parv[1] = servername
  */
-static int
-m_accept(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+static void
+m_accept(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        char *nick;
        char *p = NULL;
@@ -69,7 +71,7 @@ m_accept(struct Client *client_p, struct Client *source_p, int parc, const char
        if(*parv[1] == '*')
        {
                list_accepts(source_p);
-               return 0;
+               return;
        }
 
        build_nicklist(source_p, addbuf, delbuf, parv[1]);
@@ -122,15 +124,13 @@ m_accept(struct Client *client_p, struct Client *source_p, int parc, const char
                if(accept_num >= ConfigFileEntry.max_accept)
                {
                        sendto_one(source_p, form_str(ERR_ACCEPTFULL), me.name, source_p->name);
-                       return 0;
+                       return;
                }
 
                /* why is this here? */
                /* del_from accept(target_p, source_p); */
                add_accept(source_p, target_p);
        }
-
-       return 0;
 }
 
 /*