1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 23:06:38 +02:00

Added cmd_notice_ops() function to IRCDProtoNew class.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1221 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Robin Burchell w00t@inspircd.org
2008-09-30 18:45:11 +00:00
parent ac05ac3857
commit bc9e96d6eb
13 changed files with 30 additions and 60 deletions
-1
View File
@@ -613,7 +613,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_ops(void (*func) (const char *source, const char *dest, const char *buf));
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_privmsg(void (*func) (const char *source, const char *dest, const char *buf));
+1 -1
View File
@@ -1079,7 +1079,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_ops)(const char *source, const char *dest, const char *buf);
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_privmsg)(const char *source, const char *dest, const char *buf);
@@ -1151,6 +1150,7 @@ class IRCDProtoNew {
virtual void cmd_mode(const char *source, const char *dest, const char *buf) = 0;
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;
};
typedef struct ircd_modes_ {
+8 -16
View File
@@ -50,7 +50,6 @@ void initIrcdProto()
ircdproto.ircd_cmd_372_error = NULL;
ircdproto.ircd_cmd_375 = NULL;
ircdproto.ircd_cmd_376 = NULL;
ircdproto.ircd_cmd_notice_ops = NULL;
ircdproto.ircd_cmd_notice = NULL;
ircdproto.ircd_cmd_notice2 = NULL;
ircdproto.ircd_cmd_privmsg = NULL;
@@ -226,15 +225,14 @@ void anope_cmd_kick(const char *source, const char *chan, const char *user, cons
void anope_cmd_notice_ops(const char *source, const char *dest, const char *fmt, ...)
{
va_list args;
char buf[BUFSIZE];
*buf = '\0';
if (fmt) {
va_start(args, fmt);
vsnprintf(buf, BUFSIZE - 1, fmt, args);
va_end(args);
}
ircdproto.ircd_cmd_notice_ops(source, dest, buf);
va_list args;
char buf[BUFSIZE] = "";
if (fmt) {
va_start(args, fmt);
vsnprintf(buf, BUFSIZE - 1, fmt, args);
va_end(args);
}
ircdprotonew->cmd_notice_ops(source, dest, buf);
}
void anope_cmd_notice(const char *source, const char *dest, const char *fmt, ...)
@@ -695,12 +693,6 @@ void pmodule_cmd_376(void (*func) (const char *source))
ircdproto.ircd_cmd_376 = func;
}
void
pmodule_cmd_notice_ops(void (*func) (const char *source, const char *dest, const char *buf))
{
ircdproto.ircd_cmd_notice_ops = func;
}
void pmodule_cmd_notice(void (*func) (const char *source, const char *dest, const char *buf))
{
ircdproto.ircd_cmd_notice = func;
+3 -6
View File
@@ -1021,12 +1021,10 @@ int anope_event_motd(const char *source, int ac, const char **av)
return MOD_CONT;
}
void bahamut_cmd_notice_ops(const char *source, const char *dest, const char *buf)
void BahamutIRCdProto::cmd_notice_ops(const char *source, const char *dest, const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
if (!buf) return;
send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
}
/* NOTICE */
@@ -1527,7 +1525,6 @@ void moduleAddAnopeCmds()
pmodule_cmd_372_error(bahamut_cmd_372_error);
pmodule_cmd_375(bahamut_cmd_375);
pmodule_cmd_376(bahamut_cmd_376);
pmodule_cmd_notice_ops(bahamut_cmd_notice_ops);
pmodule_cmd_notice(bahamut_cmd_notice);
pmodule_cmd_notice2(bahamut_cmd_notice2);
pmodule_cmd_privmsg(bahamut_cmd_privmsg);
+1 -1
View File
@@ -63,7 +63,6 @@ void bahamut_cmd_372(const char *source, const char *msg);
void bahamut_cmd_372_error(const char *source);
void bahamut_cmd_375(const char *source);
void bahamut_cmd_376(const char *source);
void bahamut_cmd_notice_ops(const char *source, const char *dest, const char *buf);
void bahamut_cmd_notice(const char *source, const char *dest, const char *buf);
void bahamut_cmd_notice2(const char *source, const char *dest, const char *msg);
void bahamut_cmd_privmsg(const char *source, const char *dest, const char *buf);
@@ -128,4 +127,5 @@ class BahamutIRCdProto : public IRCDProtoNew {
void cmd_mode(const char *source, const char *dest, const char *buf);
void cmd_bot_nick(const char *, const char *, const char *, const char *, const char *);
void cmd_kick(const char *source, const char *chan, const char *user, const char *buf);
void cmd_notice_ops(const char *, const char *, const char *);
} ircd_proto;
+4 -10
View File
@@ -1362,16 +1362,11 @@ void CharybdisProto::cmd_kick(const char *source, const char *chan, const char *
else send_cmd(UseTS6 ? (ud ? ud->uid : source) : source, "KICK %s %s", chan, UseTS6 ? (u ? u->uid : user) : user);
}
void charybdis_cmd_notice_ops(const char *source, const char *dest, const char *buf)
void CharybdisProto::cmd_notice_ops(const char *source, const char *dest, const char *buf)
{
Uid *ud;
ud = find_uid(source);
if (!buf) {
return;
}
send_cmd((UseTS6 ? (ud ? ud->uid : source) : source), "NOTICE @%s :%s", dest, buf);
if (!buf) return;
Uid *ud = find_uid(source);
send_cmd(UseTS6 ? (ud ? ud->uid : source) : source, "NOTICE @%s :%s", dest, buf);
}
void charybdis_cmd_bot_chan_mode(const char *nick, const char *chan)
@@ -1780,7 +1775,6 @@ void moduleAddAnopeCmds()
pmodule_cmd_372_error(charybdis_cmd_372_error);
pmodule_cmd_375(charybdis_cmd_375);
pmodule_cmd_376(charybdis_cmd_376);
pmodule_cmd_notice_ops(charybdis_cmd_notice_ops);
pmodule_cmd_notice(charybdis_cmd_notice);
pmodule_cmd_notice2(charybdis_cmd_notice2);
pmodule_cmd_privmsg(charybdis_cmd_privmsg);
+1 -1
View File
@@ -51,7 +51,6 @@ void charybdis_cmd_372(const char *source, const char *msg);
void charybdis_cmd_372_error(const char *source);
void charybdis_cmd_375(const char *source);
void charybdis_cmd_376(const char *source);
void charybdis_cmd_notice_ops(const char *source, const char *dest, const char *buf);
void charybdis_cmd_notice(const char *source, const char *dest, const char *buf);
void charybdis_cmd_notice2(const char *source, const char *dest, const char *msg);
void charybdis_cmd_privmsg(const char *source, const char *dest, const char *buf);
@@ -115,4 +114,5 @@ class CharybdisProto : public IRCDProtoNew {
void cmd_mode(const char *source, const char *dest, const char *buf);
void cmd_bot_nick(const char *, const char *, const char *, const char *, const char *);
void cmd_kick(const char *source, const char *chan, const char *user, const char *buf);
void cmd_notice_ops(const char *, const char *, const char *);
} ircd_proto;
+3 -7
View File
@@ -773,13 +773,10 @@ void InspIRCdProto::cmd_kick(const char *source, const char *chan, const char *u
else send_cmd(source, "KICK %s %s :%s", chan, user, user);
}
void inspircd_cmd_notice_ops(const char *source, const char *dest, const char *buf)
void InspIRCdProto::cmd_notice_ops(const char *source, const char *dest, const char *buf)
{
if (!buf) {
return;
}
send_cmd(ServerName, "NOTICE @%s :%s", dest, buf);
if (!buf) return;
send_cmd(ServerName, "NOTICE @%s :%s", dest, buf);
}
@@ -1775,7 +1772,6 @@ void moduleAddAnopeCmds()
pmodule_cmd_372_error(inspircd_cmd_372_error);
pmodule_cmd_375(inspircd_cmd_375);
pmodule_cmd_376(inspircd_cmd_376);
pmodule_cmd_notice_ops(inspircd_cmd_notice_ops);
pmodule_cmd_notice(inspircd_cmd_notice);
pmodule_cmd_notice2(inspircd_cmd_notice2);
pmodule_cmd_privmsg(inspircd_cmd_privmsg);
+1 -1
View File
@@ -56,7 +56,6 @@ void inspircd_cmd_372(const char *source, const char *msg);
void inspircd_cmd_372_error(const char *source);
void inspircd_cmd_375(const char *source);
void inspircd_cmd_376(const char *source);
void inspircd_cmd_notice_ops(const char *source, const char *dest, const char *buf);
void inspircd_cmd_notice(const char *source, const char *dest, const char *buf);
void inspircd_cmd_notice2(const char *source, const char *dest, const char *msg);
void inspircd_cmd_privmsg(const char *source, const char *dest, const char *buf);
@@ -132,4 +131,5 @@ class InspIRCdProto : public IRCDProtoNew {
void cmd_mode(const char *source, const char *dest, const char *buf);
void cmd_bot_nick(const char *, const char *, const char *, const char *, const char *);
void cmd_kick(const char *source, const char *chan, const char *user, const char *buf);
void cmd_notice_ops(const char *, const char *, const char *);
} ircd_proto;
+3 -7
View File
@@ -1295,13 +1295,10 @@ void RatboxProto::cmd_kick(const char *source, const char *chan, const char *use
else send_cmd(UseTS6 ? (ud ? ud->uid : source) : source, "KICK %s %s", chan, UseTS6 ? (u ? u->uid : user) : user);
}
void ratbox_cmd_notice_ops(const char *source, const char *dest, const char *buf)
void RatboxProto::cmd_notice_ops(const char *source, const char *dest, const char *buf)
{
if (!buf) {
return;
}
send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
if (!buf) return;
send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
}
void ratbox_cmd_bot_chan_mode(const char *nick, const char *chan)
@@ -1672,7 +1669,6 @@ void moduleAddAnopeCmds()
pmodule_cmd_372_error(ratbox_cmd_372_error);
pmodule_cmd_375(ratbox_cmd_375);
pmodule_cmd_376(ratbox_cmd_376);
pmodule_cmd_notice_ops(ratbox_cmd_notice_ops);
pmodule_cmd_notice(ratbox_cmd_notice);
pmodule_cmd_notice2(ratbox_cmd_notice2);
pmodule_cmd_privmsg(ratbox_cmd_privmsg);
+1 -1
View File
@@ -50,7 +50,6 @@ void ratbox_cmd_372(const char *source, const char *msg);
void ratbox_cmd_372_error(const char *source);
void ratbox_cmd_375(const char *source);
void ratbox_cmd_376(const char *source);
void ratbox_cmd_notice_ops(const char *source, const char *dest, const char *buf);
void ratbox_cmd_notice(const char *source, const char *dest, const char *buf);
void ratbox_cmd_notice2(const char *source, const char *dest, const char *msg);
void ratbox_cmd_privmsg(const char *source, const char *dest, const char *buf);
@@ -113,4 +112,5 @@ class RatboxProto : public IRCDProtoNew {
void cmd_mode(const char *source, const char *dest, const char *buf);
void cmd_bot_nick(const char *, const char *, const char *, const char *, const char *);
void cmd_kick(const char *source, const char *chan, const char *user, const char *buf);
void cmd_notice_ops(const char *, const char *, const char *);
} ircd_proto;
+3 -7
View File
@@ -622,13 +622,10 @@ void UnrealIRCdProto::cmd_kick(const char *source, const char *chan, const char
else send_cmd(source, "%s %s %s", send_token("KICK", "H"), chan, user);
}
void unreal_cmd_notice_ops(const char *source, const char *dest, const char *buf)
void UnrealIRCdProto::cmd_notice_ops(const char *source, const char *dest, const char *buf)
{
if (!buf) {
return;
}
send_cmd(source, "%s @%s :%s", send_token("NOTICE", "B"), dest, buf);
if (!buf) return;
send_cmd(source, "%s @%s :%s", send_token("NOTICE", "B"), dest, buf);
}
@@ -2076,7 +2073,6 @@ void moduleAddAnopeCmds()
pmodule_cmd_372_error(unreal_cmd_372_error);
pmodule_cmd_375(unreal_cmd_375);
pmodule_cmd_376(unreal_cmd_376);
pmodule_cmd_notice_ops(unreal_cmd_notice_ops);
pmodule_cmd_notice(unreal_cmd_notice);
pmodule_cmd_notice2(unreal_cmd_notice2);
pmodule_cmd_privmsg(unreal_cmd_privmsg);
+1 -1
View File
@@ -85,7 +85,6 @@ void unreal_cmd_372(const char *source, const char *msg);
void unreal_cmd_372_error(const char *source);
void unreal_cmd_375(const char *source);
void unreal_cmd_376(const char *source);
void unreal_cmd_notice_ops(const char *source, const char *dest, const char *buf);
void unreal_cmd_notice(const char *source, const char *dest, const char *buf);
void unreal_cmd_notice2(const char *source, const char *dest, const char *msg);
void unreal_cmd_privmsg(const char *source, const char *dest, const char *buf);
@@ -151,4 +150,5 @@ class UnrealIRCdProto : public IRCDProtoNew {
void cmd_mode(const char *source, const char *dest, const char *buf);
void cmd_bot_nick(const char *, const char *, const char *, const char *, const char *);
void cmd_kick(const char *source, const char *chan, const char *user, const char *buf);
void cmd_notice_ops(const char *, const char *, const char *);
} ircd_proto;