1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 16:23:13 +02:00

Added cmd_message() function to IRCDProtoNew class. (Replaces cmd_notice)

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1227 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Robin Burchell w00t@inspircd.org
2008-09-30 18:45:11 +00:00
parent 6e0bee3ab1
commit 58ab9f234c
14 changed files with 35 additions and 105 deletions
+1 -2
View File
@@ -611,7 +611,6 @@ E void pmodule_cmd_372(void (*func) (const char *source, const char *msg));
E void pmodule_cmd_372_error(void (*func) (const char *source));
E void pmodule_cmd_375(void (*func) (const char *source));
E void pmodule_cmd_376(void (*func) (const char *source));
E void pmodule_cmd_notice(void (*func) (const char *source, const char *dest, const char *buf));
E void pmodule_cmd_notice2(void (*func) (const char *source, const char *dest, const char *msg));
E void pmodule_cmd_serv_notice(void (*func) (const char *source, const char *dest, const char *msg));
E void pmodule_cmd_serv_privmsg(void (*func) (const char *source, const char *dest, const char *msg));
@@ -1220,7 +1219,7 @@ E void anope_cmd_nick(const char *nick, const char *name, const char *mode);
E void anope_cmd_chg_nick(const char *oldnick, const char *newnick); /* NICK */
E void anope_cmd_bot_nick(const char *nick, const char *user,const char *host,const char *real,const char *modes); /* NICK */
E void anope_cmd_guest_nick(const char *nick, const char *user,const char *host,const char *real,const char *modes); /* NICK */
E void anope_cmd_notice(const char *source, const char *dest, const char *fmt, ...); /* NOTICE */
E void anope_cmd_message(const char *source, const char *dest, const char *fmt, ...); /* NOTICE */
E void anope_cmd_notice_ops(const char *source, const char *dest, const char *fmt, ...); /* NOTICE */
E void anope_cmd_notice2(const char *source, const char *dest, const char *msg); /* NOTICE */
E void anope_cmd_serv_notice(const char *source, const char *dest, const char *msg); /* NOTICE */
+6 -1
View File
@@ -1059,7 +1059,6 @@ typedef struct ircd_proto_ {
void (*ircd_cmd_372_error)(const char *source);
void (*ircd_cmd_375)(const char *source);
void (*ircd_cmd_376)(const char *source);
void (*ircd_cmd_notice)(const char *source, const char *dest, const char *buf);
void (*ircd_cmd_notice2)(const char *source, const char *dest, const char *msg);
void (*ircd_cmd_serv_notice)(const char *source, const char *dest, const char *msg);
void (*ircd_cmd_serv_privmsg)(const char *source, const char *dest, const char *msg);
@@ -1306,6 +1305,12 @@ class IRCDProtoNew {
virtual void cmd_bot_nick(const char *, const char *, const char *, const char *, const char *) = 0;
virtual void cmd_kick(const char *source, const char *chan, const char *user, const char *buf) = 0;
virtual void cmd_notice_ops(const char *, const char *dest, const char *buf) = 0;
virtual void cmd_message(const char *source, const char *dest, const char *buf)
{
if (!buf || !dest) return;
if (NSDefFlags & NI_MSG) cmd_privmsg(source, dest, buf);
else send_cmd(source, "NOTICE %s :%s", dest, buf);
}
virtual void cmd_privmsg(const char *source, const char *dest, const char *buf)
{
if (!buf || !dest) return;