]> jfr.im git - solanum.git/blobdiff - modules/core/m_server.c
Add more core module descriptions
[solanum.git] / modules / core / m_server.c
index ef4fca8c4f602524779be74c114fc9d36bced48b..3933c311e9f837ab7abb6d20fbc3eecdcbd03208 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_server.c 3291 2007-03-28 14:30:10Z jilles $
  */
 
 #include "stdinc.h"
 #include "parse.h"
 #include "modules.h"
 
-static int mr_server(struct Client *, struct Client *, int, const char **);
-static int ms_server(struct Client *, struct Client *, int, const char **);
-static int ms_sid(struct Client *, struct Client *, int, const char **);
+static int mr_server(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int ms_server(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int ms_sid(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
 
 struct Message server_msgtab = {
-       "SERVER", 0, 0, 0, MFLG_SLOW | MFLG_UNREG,
+       "SERVER", 0, 0, 0, 0,
        {{mr_server, 4}, mg_reg, mg_ignore, {ms_server, 4}, mg_ignore, mg_reg}
 };
 struct Message sid_msgtab = {
-       "SID", 0, 0, 0, MFLG_SLOW,
+       "SID", 0, 0, 0, 0,
        {mg_ignore, mg_reg, mg_ignore, {ms_sid, 5}, mg_ignore, mg_reg}
 };
 
 mapi_clist_av1 server_clist[] = { &server_msgtab, &sid_msgtab, NULL };
 
-DECLARE_MODULE_AV1(server, NULL, NULL, server_clist, NULL, NULL, "$Revision: 3291 $");
+static const char server_desc[] = "Provides the SERVER and SID commands for TS6 use";
+
+DECLARE_MODULE_AV2(server, NULL, NULL, server_clist, NULL, NULL, NULL, NULL, server_desc);
 
 int bogus_host(const char *host);
 static int set_server_gecos(struct Client *, const char *);
@@ -69,7 +69,7 @@ static int set_server_gecos(struct Client *, const char *);
  *      parv[3] = serverinfo
  */
 static int
-mr_server(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+mr_server(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        char info[REALLEN + 1];
        const char *name;
@@ -289,7 +289,7 @@ mr_server(struct Client *client_p, struct Client *source_p, int parc, const char
  *      parv[3] = serverinfo
  */
 static int
-ms_server(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+ms_server(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        char info[REALLEN + 1];
        /* same size as in s_misc.c */
@@ -330,7 +330,7 @@ ms_server(struct Client *client_p, struct Client *source_p, int parc, const char
                ilog(L_SERVER, "Link %s cancelled, server %s already exists",
                        client_p->name, name);
 
-               rb_snprintf(squitreason, sizeof squitreason,
+               snprintf(squitreason, sizeof squitreason,
                                "Server %s already exists",
                                name);
                exit_client(client_p, client_p, &me, squitreason);
@@ -416,7 +416,7 @@ ms_server(struct Client *client_p, struct Client *source_p, int parc, const char
                ilog(L_SERVER, "Non-Hub link %s introduced %s.",
                        client_p->name, name);
 
-               rb_snprintf(squitreason, sizeof squitreason,
+               snprintf(squitreason, sizeof squitreason,
                                "No matching hub_mask for %s",
                                name);
                exit_client(NULL, client_p, &me, squitreason);
@@ -433,7 +433,7 @@ ms_server(struct Client *client_p, struct Client *source_p, int parc, const char
                ilog(L_SERVER, "Link %s introduced leafed server %s.",
                        client_p->name, name);
 
-               rb_snprintf(squitreason, sizeof squitreason,
+               snprintf(squitreason, sizeof squitreason,
                                "Matching leaf_mask for %s",
                                name);
                exit_client(NULL, client_p, &me, squitreason);
@@ -492,7 +492,7 @@ ms_server(struct Client *client_p, struct Client *source_p, int parc, const char
 }
 
 static int
-ms_sid(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+ms_sid(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        struct Client *target_p;
        struct remote_conf *hub_p;
@@ -508,7 +508,7 @@ ms_sid(struct Client *client_p, struct Client *source_p, int parc, const char *p
                ilog(L_SERVER, "Link %s cancelled, server %s already exists",
                        client_p->name, parv[1]);
 
-               rb_snprintf(squitreason, sizeof squitreason,
+               snprintf(squitreason, sizeof squitreason,
                                "Server %s already exists",
                                parv[1]);
                exit_client(NULL, client_p, &me, squitreason);
@@ -527,7 +527,7 @@ ms_sid(struct Client *client_p, struct Client *source_p, int parc, const char *p
                ilog(L_SERVER, "Link %s cancelled, SID %s for server %s already in use by %s",
                        client_p->name, parv[3], parv[1], target_p->name);
 
-               rb_snprintf(squitreason, sizeof squitreason,
+               snprintf(squitreason, sizeof squitreason,
                                "SID %s for %s already in use by %s",
                                parv[3], parv[1], target_p->name);
                exit_client(NULL, client_p, &me, squitreason);
@@ -587,7 +587,7 @@ ms_sid(struct Client *client_p, struct Client *source_p, int parc, const char *p
                ilog(L_SERVER, "Non-Hub link %s introduced %s.",
                        client_p->name, parv[1]);
 
-               rb_snprintf(squitreason, sizeof squitreason,
+               snprintf(squitreason, sizeof squitreason,
                                "No matching hub_mask for %s",
                                parv[1]);
                exit_client(NULL, client_p, &me, squitreason);
@@ -603,7 +603,7 @@ ms_sid(struct Client *client_p, struct Client *source_p, int parc, const char *p
                ilog(L_SERVER, "Link %s introduced leafed server %s.",
                        client_p->name, parv[1]);
 
-               rb_snprintf(squitreason, sizeof squitreason,
+               snprintf(squitreason, sizeof squitreason,
                                "Matching leaf_mask for %s",
                                parv[1]);
                exit_client(NULL, client_p, &me, squitreason);