]> jfr.im git - solanum.git/blobdiff - modules/m_cap.c
msg: remove last vestiges of the fakelag system. charybdis has never supported fakelag.
[solanum.git] / modules / m_cap.c
index 072be44373705d2b6611626ce2dbf4b85ea41dd5..ed68ca97ad913b2f13225f8a8671171869341d08 100644 (file)
 
 typedef int (*bqcmp)(const void *, const void *);
 
-static int m_cap(struct Client *, struct Client *, int, const char **);
+static int m_cap(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
 static int modinit(void);
 
 struct Message cap_msgtab = {
-       "CAP", 0, 0, 0, MFLG_SLOW,
+       "CAP", 0, 0, 0, 0,
        {{m_cap, 2}, {m_cap, 2}, mg_ignore, mg_ignore, mg_ignore, {m_cap, 2}}
 };
 
@@ -187,7 +187,7 @@ clicap_generate(struct Client *source_p, const char *subcmd, int flags, int clea
        int curlen, mlen;
        size_t i;
 
-       mlen = rb_sprintf(buf, ":%s CAP %s %s",
+       mlen = sprintf(buf, ":%s CAP %s %s",
                        me.name,
                        EmptyString(source_p->name) ? "*" : source_p->name,
                        subcmd);
@@ -247,7 +247,7 @@ clicap_generate(struct Client *source_p, const char *subcmd, int flags, int clea
                        buflen++;
                }
 
-               curlen = rb_sprintf(p, "%s ", clicap_list[i].name);
+               curlen = sprintf(p, "%s ", clicap_list[i].name);
                p += curlen;
                buflen += curlen;
        }
@@ -357,7 +357,7 @@ cap_req(struct Client *source_p, const char *arg)
        if(EmptyString(arg))
                return;
 
-       buflen = rb_snprintf(buf, sizeof(buf), ":%s CAP %s ACK",
+       buflen = snprintf(buf, sizeof(buf), ":%s CAP %s ACK",
                        me.name, EmptyString(source_p->name) ? "*" : source_p->name);
 
        pbuf[0][0] = '\0';
@@ -426,8 +426,10 @@ cap_req(struct Client *source_p, const char *arg)
                }
 
                strcat(pbuf[i], cap->name);
-               strcat(pbuf[i], " ");
-               plen += (cap->namelen + 1);
+               if (!finished) {
+                       strcat(pbuf[i], " ");
+                       plen += (cap->namelen + 1);
+               }
        }
 
        if(!finished)
@@ -470,7 +472,7 @@ clicap_cmd_search(const char *command, struct clicap_cmd *entry)
 }
 
 static int
-m_cap(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+m_cap(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        struct clicap_cmd *cmd;