]> jfr.im git - solanum.git/blobdiff - modules/m_encap.c
extensions/umode_hide_idle_time: mask times for hidden sources (#373)
[solanum.git] / modules / m_encap.c
index ac773cf1e4899fd83574c16d82f544364a14e31f..f87ed65586815494041c0f0fa4590116027f8215 100644 (file)
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id: m_encap.c 254 2005-09-21 23:35:12Z nenolod $
  */
 
 #include "stdinc.h"
 #include "send.h"
 #include "channel.h"
 #include "client.h"
-#include "common.h"
-#include "config.h"
+#include "defaults.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "s_serv.h"
 #include "parse.h"
 #include "modules.h"
 
-static int ms_encap(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p,
-                    int parc, const char *parv[]);
+static const char encap_desc[] = "Provides the TS6 ENCAP facility";
+
+static void ms_encap(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p,
+               int parc, const char *parv[]);
 
 struct Message encap_msgtab = {
-       "ENCAP", 0, 0, 0, MFLG_SLOW,
+       "ENCAP", 0, 0, 0, 0,
        {mg_ignore, mg_ignore, {ms_encap, 3}, {ms_encap, 3}, mg_ignore, mg_ignore}
 };
 
 mapi_clist_av1 encap_clist[] = { &encap_msgtab, NULL };
-DECLARE_MODULE_AV1(encap, NULL, NULL, encap_clist, NULL, NULL, "$Revision: 254 $");
+
+DECLARE_MODULE_AV2(encap, NULL, NULL, encap_clist, NULL, NULL, NULL, NULL, encap_desc);
 
 /* ms_encap()
  *
@@ -60,7 +60,7 @@ DECLARE_MODULE_AV1(encap, NULL, NULL, encap_clist, NULL, NULL, "$Revision: 254 $
  * parv[2] - subcommand
  * parv[3] - parameters
  */
-static int
+static void
 ms_encap(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        char buffer[BUFSIZE];
@@ -77,7 +77,7 @@ ms_encap(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
 
                /* ugh, not even at the last parameter, just bail --fl */
                if((size_t)(cur_len + len) >= sizeof(buffer))
-                       return 0;
+                       return;
 
                snprintf(ptr, sizeof(buffer) - cur_len, "%s ", parv[i]);
                cur_len += len;
@@ -102,6 +102,4 @@ ms_encap(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
        /* if it matches us, find a matching handler and call it */
        if(match(parv[1], me.name))
                handle_encap(msgbuf_p, client_p, source_p, parv[2], parc - 2, parv + 2);
-
-       return 0;
 }