mirror of
https://github.com/anope/anope.git
synced 2026-07-04 11:43:12 +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:
@@ -1027,20 +1027,6 @@ void BahamutIRCdProto::cmd_notice_ops(const char *source, const char *dest, cons
|
||||
send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
|
||||
}
|
||||
|
||||
/* NOTICE */
|
||||
void bahamut_cmd_notice(const char *source, const char *dest, const char *buf)
|
||||
{
|
||||
if (!buf) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (NSDefFlags & NI_MSG) {
|
||||
ircd_proto.cmd_privmsg(source, dest, buf);
|
||||
} else {
|
||||
send_cmd(source, "NOTICE %s :%s", dest, buf);
|
||||
}
|
||||
}
|
||||
|
||||
void bahamut_cmd_notice2(const char *source, const char *dest, const char *msg)
|
||||
{
|
||||
send_cmd(source, "NOTICE %s :%s", dest, msg);
|
||||
@@ -1516,7 +1502,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(bahamut_cmd_notice);
|
||||
pmodule_cmd_notice2(bahamut_cmd_notice2);
|
||||
pmodule_cmd_serv_notice(bahamut_cmd_serv_notice);
|
||||
pmodule_cmd_serv_privmsg(bahamut_cmd_serv_privmsg);
|
||||
|
||||
@@ -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(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_serv_notice(const char *source, const char *dest, const char *msg);
|
||||
void bahamut_cmd_serv_privmsg(const char *source, const char *dest, const char *msg);
|
||||
|
||||
@@ -451,24 +451,15 @@ CUMode myCumodes[128] = {
|
||||
|
||||
|
||||
|
||||
void charybdis_cmd_notice(const char *source, const char *dest, const char *buf)
|
||||
void CharybdisProto::cmd_message(const char *source, const char *dest, const char *buf)
|
||||
{
|
||||
Uid *ud;
|
||||
User *u;
|
||||
|
||||
if (!buf) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (NSDefFlags & NI_MSG) {
|
||||
ircd_proto.cmd_privmsg(source, dest, buf);
|
||||
} else {
|
||||
ud = find_uid(source);
|
||||
u = finduser(dest);
|
||||
send_cmd((UseTS6 ? (ud ? ud->uid : source) : source),
|
||||
"NOTICE %s :%s", (UseTS6 ? (u ? u->uid : dest) : dest),
|
||||
buf);
|
||||
}
|
||||
if (!buf) return;
|
||||
if (NSDefFlags & NI_MSG) cmd_privmsg(source, dest, buf);
|
||||
else {
|
||||
Uid *ud = find_uid(source);
|
||||
User *u = finduser(dest);
|
||||
send_cmd(UseTS6 ? (ud ? ud->uid : source) : source, "NOTICE %s :%s", UseTS6 ? (u ? u->uid : dest) : dest, buf);
|
||||
}
|
||||
}
|
||||
|
||||
void charybdis_cmd_notice2(const char *source, const char *dest, const char *msg)
|
||||
@@ -1768,7 +1759,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(charybdis_cmd_notice);
|
||||
pmodule_cmd_notice2(charybdis_cmd_notice2);
|
||||
pmodule_cmd_serv_notice(charybdis_cmd_serv_notice);
|
||||
pmodule_cmd_serv_privmsg(charybdis_cmd_serv_privmsg);
|
||||
|
||||
@@ -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(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_serv_notice(const char *source, const char *dest, const char *msg);
|
||||
void charybdis_cmd_serv_privmsg(const char *source, const char *dest, const char *msg);
|
||||
@@ -114,5 +113,6 @@ class CharybdisProto : public IRCDProtoNew {
|
||||
void cmd_bot_nick(const char *, const char *, const char *, const char *, const char *);
|
||||
void cmd_kick(const char *, const char *, const char *, const char *);
|
||||
void cmd_notice_ops(const char *, const char *, const char *);
|
||||
void cmd_message(const char *, const char *, const char *);
|
||||
void cmd_privmsg(const char *, const char *, const char *);
|
||||
} ircd_proto;
|
||||
|
||||
@@ -780,19 +780,6 @@ void InspIRCdProto::cmd_notice_ops(const char *source, const char *dest, const c
|
||||
}
|
||||
|
||||
|
||||
void inspircd_cmd_notice(const char *source, const char *dest, const char *buf)
|
||||
{
|
||||
if (!buf) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (NSDefFlags & NI_MSG) {
|
||||
ircd_proto.cmd_privmsg(source, dest, buf);
|
||||
} else {
|
||||
send_cmd(source, "NOTICE %s :%s", dest, buf);
|
||||
}
|
||||
}
|
||||
|
||||
void inspircd_cmd_notice2(const char *source, const char *dest, const char *msg)
|
||||
{
|
||||
send_cmd(source, "NOTICE %s :%s", dest, msg);
|
||||
@@ -1763,7 +1750,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(inspircd_cmd_notice);
|
||||
pmodule_cmd_notice2(inspircd_cmd_notice2);
|
||||
pmodule_cmd_serv_notice(inspircd_cmd_serv_notice);
|
||||
pmodule_cmd_serv_privmsg(inspircd_cmd_serv_privmsg);
|
||||
|
||||
@@ -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(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_serv_notice(const char *source, const char *dest, const char *msg);
|
||||
void inspircd_cmd_serv_privmsg(const char *source, const char *dest, const char *msg);
|
||||
|
||||
+8
-18
@@ -440,24 +440,15 @@ CUMode myCumodes[128] = {
|
||||
|
||||
|
||||
|
||||
void ratbox_cmd_notice(const char *source, const char *dest, const char *buf)
|
||||
void RatboxProto::cmd_message(const char *source, const char *dest, const char *buf)
|
||||
{
|
||||
Uid *ud;
|
||||
User *u;
|
||||
|
||||
if (!buf) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (NSDefFlags & NI_MSG) {
|
||||
ircd_proto.cmd_privmsg(source, dest, buf);
|
||||
} else {
|
||||
ud = find_uid(source);
|
||||
u = finduser(dest);
|
||||
send_cmd((UseTS6 ? (ud ? ud->uid : source) : source),
|
||||
"NOTICE %s :%s", (UseTS6 ? (u ? u->uid : dest) : dest),
|
||||
buf);
|
||||
}
|
||||
if (!buf) return;
|
||||
if (NSDefFlags & NI_MSG) cmd_privmsg(source, dest, buf);
|
||||
else {
|
||||
Uid *ud = find_uid(source);
|
||||
User *u = finduser(dest);
|
||||
send_cmd(UseTS6 ? (ud ? ud->uid : source) : source, "NOTICE %s :%s", UseTS6 ? (u ? u->uid : dest) : dest, buf);
|
||||
}
|
||||
}
|
||||
|
||||
void ratbox_cmd_notice2(const char *source, const char *dest, const char *msg)
|
||||
@@ -1662,7 +1653,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(ratbox_cmd_notice);
|
||||
pmodule_cmd_notice2(ratbox_cmd_notice2);
|
||||
pmodule_cmd_serv_notice(ratbox_cmd_serv_notice);
|
||||
pmodule_cmd_serv_privmsg(ratbox_cmd_serv_privmsg);
|
||||
|
||||
@@ -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(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_serv_notice(const char *source, const char *dest, const char *msg);
|
||||
void ratbox_cmd_serv_privmsg(const char *source, const char *dest, const char *msg);
|
||||
@@ -112,5 +111,6 @@ class RatboxProto : public IRCDProtoNew {
|
||||
void cmd_bot_nick(const char *, const char *, const char *, const char *, const char *);
|
||||
void cmd_kick(const char *, const char *, const char *, const char *);
|
||||
void cmd_notice_ops(const char *, const char *, const char *);
|
||||
void cmd_message(const char *, const char *, const char *);
|
||||
void cmd_privmsg(const char *, const char *, const char *);
|
||||
} ircd_proto;
|
||||
|
||||
@@ -629,20 +629,6 @@ void UnrealIRCdProto::cmd_notice_ops(const char *source, const char *dest, const
|
||||
}
|
||||
|
||||
|
||||
void unreal_cmd_notice(const char *source, const char *dest, const char *buf)
|
||||
{
|
||||
if (!buf) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (NSDefFlags & NI_MSG) {
|
||||
ircd_proto.cmd_privmsg(source, dest, buf);
|
||||
} else {
|
||||
send_cmd(source, "%s %s :%s", send_token("NOTICE", "B"), dest,
|
||||
buf);
|
||||
}
|
||||
}
|
||||
|
||||
void unreal_cmd_notice2(const char *source, const char *dest, const char *msg)
|
||||
{
|
||||
send_cmd(source, "%s %s :%s", send_token("NOTICE", "B"), dest, msg);
|
||||
@@ -2064,7 +2050,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(unreal_cmd_notice);
|
||||
pmodule_cmd_notice2(unreal_cmd_notice2);
|
||||
pmodule_cmd_serv_notice(unreal_cmd_serv_notice);
|
||||
pmodule_cmd_serv_privmsg(unreal_cmd_serv_privmsg);
|
||||
|
||||
@@ -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(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_serv_notice(const char *source, const char *dest, const char *msg);
|
||||
void unreal_cmd_serv_privmsg(const char *source, const char *dest, const char *msg);
|
||||
|
||||
Reference in New Issue
Block a user