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}}
};
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);
buflen++;
}
- curlen = rb_sprintf(p, "%s ", clicap_list[i].name);
+ curlen = sprintf(p, "%s ", clicap_list[i].name);
p += curlen;
buflen += curlen;
}
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';
}
strcat(pbuf[i], cap->name);
- strcat(pbuf[i], " ");
- plen += (cap->namelen + 1);
+ if (!finished) {
+ strcat(pbuf[i], " ");
+ plen += (cap->namelen + 1);
+ }
}
if(!finished)
}
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;