]> jfr.im git - solanum.git/blobdiff - modules/m_map.c
Message handlers should return void.
[solanum.git] / modules / m_map.c
index ba2bd44275e3812848e74cf6627c6b81652759b3..8675fed8e4918f20eae0939bb8df1ef1bc4cd6ec 100644 (file)
 
 #define USER_COL       50      /* display | Users: %d at col 50 */
 
-static int m_map(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
-static int mo_map(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
+static const char map_desc[] = "Provides the MAP command to view network topology information";
+
+static void m_map(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
+static void mo_map(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
 
 struct Message map_msgtab = {
        "MAP", 0, 0, 0, 0,
@@ -39,7 +41,8 @@ struct Message map_msgtab = {
 };
 
 mapi_clist_av1 map_clist[] = { &map_msgtab, NULL };
-DECLARE_MODULE_AV1(map, NULL, NULL, map_clist, NULL, NULL, "$Revision: 3368 $");
+
+DECLARE_MODULE_AV2(map, NULL, NULL, map_clist, NULL, NULL, NULL, NULL, map_desc);
 
 static void dump_map(struct Client *client_p, struct Client *root, char *pbuf);
 static void flattened_map(struct Client *client_p);
@@ -48,7 +51,7 @@ static char buf[BUFSIZE];
 
 /* m_map
 */
-static int
+static void
 m_map(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        if((!IsExemptShide(source_p) && ConfigServerHide.flatten_links) ||
@@ -56,25 +59,22 @@ m_map(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p,
        {
                flattened_map(client_p);
                sendto_one_numeric(client_p, RPL_MAPEND, form_str(RPL_MAPEND));
-               return 0;
+               return;
        }
 
        dump_map(client_p, &me, buf);
        sendto_one_numeric(client_p, RPL_MAPEND, form_str(RPL_MAPEND));
-       return 0;
 }
 
 /*
 ** mo_map
 */
-static int
+static void
 mo_map(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        dump_map(client_p, &me, buf);
        scache_send_missing(client_p);
        sendto_one_numeric(client_p, RPL_MAPEND, form_str(RPL_MAPEND));
-
-       return 0;
 }
 
 /*