]> jfr.im git - solanum.git/blobdiff - modules/m_encap.c
msg: remove last vestiges of the fakelag system. charybdis has never supported fakelag.
[solanum.git] / modules / m_encap.c
index 742c35d762db8188521eddbf9348caf116e06f3f..b6cdef7d3e3f8c662ff08e35aab94ec9ee577e40 100644 (file)
 #include "msg.h"
 #include "parse.h"
 #include "modules.h"
-#include "sprintf_irc.h"
 
-static int ms_encap(struct Client *client_p, struct Client *source_p,
+static int 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}
 };
 
@@ -62,7 +61,7 @@ DECLARE_MODULE_AV1(encap, NULL, NULL, encap_clist, NULL, NULL, "$Revision: 254 $
  * parv[3] - parameters
  */
 static int
-ms_encap(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+ms_encap(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        char buffer[BUFSIZE];
        char *ptr;
@@ -71,7 +70,7 @@ ms_encap(struct Client *client_p, struct Client *source_p, int parc, const char
        int i;
 
        ptr = buffer;
-       
+
        for(i = 1; i < parc - 1; i++)
        {
                len = strlen(parv[i]) + 1;
@@ -80,7 +79,7 @@ ms_encap(struct Client *client_p, struct Client *source_p, int parc, const char
                if((size_t)(cur_len + len) >= sizeof(buffer))
                        return 0;
 
-               rb_snprintf(ptr, sizeof(buffer) - cur_len, "%s ", parv[i]);
+               snprintf(ptr, sizeof(buffer) - cur_len, "%s ", parv[i]);
                cur_len += len;
                ptr += len;
        }
@@ -89,9 +88,9 @@ ms_encap(struct Client *client_p, struct Client *source_p, int parc, const char
 
        /* if its a command without parameters, dont prepend a ':' */
        if(parc == 3)
-               rb_snprintf(ptr, sizeof(buffer) - cur_len, "%s", parv[2]);
+               snprintf(ptr, sizeof(buffer) - cur_len, "%s", parv[2]);
        else
-               rb_snprintf(ptr, sizeof(buffer) - cur_len, ":%s", parv[parc-1]);
+               snprintf(ptr, sizeof(buffer) - cur_len, ":%s", parv[parc-1]);
 
        /* add a trailing \0 if it was too long */
        if((cur_len + len) >= BUFSIZE)
@@ -102,9 +101,7 @@ ms_encap(struct Client *client_p, struct Client *source_p, int parc, const char
 
        /* if it matches us, find a matching handler and call it */
        if(match(parv[1], me.name))
-               handle_encap(client_p, source_p, parv[2], parc - 2, parv + 2);
+               handle_encap(msgbuf_p, client_p, source_p, parv[2], parc - 2, parv + 2);
 
        return 0;
 }
-
-