#include "send.h"
#include "s_conf.h"
#include "packet.h"
+#include "supported.h"
-static int m_cmessage(int, const char *, struct Client *, struct Client *, int, const char **);
-static int m_cprivmsg(struct Client *, struct Client *, int, const char **);
-static int m_cnotice(struct Client *, struct Client *, int, const char **);
+static int m_cmessage(int, const char *, struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int m_cprivmsg(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int m_cnotice(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+
+static int
+_modinit(void)
+{
+ add_isupport("CPRIVMSG", isupport_string, "");
+ add_isupport("CNOTICE", isupport_string, "");
+
+ return 0;
+}
+
+static void
+_moddeinit(void)
+{
+ delete_isupport("CPRIVMSG");
+ delete_isupport("CNOTICE");
+}
struct Message cprivmsg_msgtab = {
- "CPRIVMSG", 0, 0, 0, MFLG_SLOW,
+ "CPRIVMSG", 0, 0, 0, 0,
{mg_ignore, {m_cprivmsg, 4}, mg_ignore, mg_ignore, mg_ignore, {m_cprivmsg, 4}}
};
struct Message cnotice_msgtab = {
- "CNOTICE", 0, 0, 0, MFLG_SLOW,
+ "CNOTICE", 0, 0, 0, 0,
{mg_ignore, {m_cnotice, 4}, mg_ignore, mg_ignore, mg_ignore, {m_cnotice, 4}}
};
mapi_clist_av1 cmessage_clist[] = { &cprivmsg_msgtab, &cnotice_msgtab, NULL };
-DECLARE_MODULE_AV1(cmessage, NULL, NULL, cmessage_clist, NULL, NULL, "$Revision: 1543 $");
+DECLARE_MODULE_AV1(cmessage, _modinit, _moddeinit, cmessage_clist, NULL, NULL, "$Revision: 1543 $");
#define PRIVMSG 0
#define NOTICE 1
static int
-m_cprivmsg(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+m_cprivmsg(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
- return m_cmessage(PRIVMSG, "PRIVMSG", client_p, source_p, parc, parv);
+ return m_cmessage(PRIVMSG, "PRIVMSG", msgbuf_p, client_p, source_p, parc, parv);
}
static int
-m_cnotice(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+m_cnotice(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
- return m_cmessage(NOTICE, "NOTICE", client_p, source_p, parc, parv);
+ return m_cmessage(NOTICE, "NOTICE", msgbuf_p, client_p, source_p, parc, parv);
}
static int
-m_cmessage(int p_or_n, const char *command,
+m_cmessage(int p_or_n, const char *command, struct MsgBuf *msgbuf_p,
struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
struct Client *target_p;