summaryrefslogtreecommitdiff
path: root/src/send.c
diff options
context:
space:
mode:
authorNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-02 19:06:00 +0000
committerNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-02 19:06:00 +0000
commit552c4a47b18a3373b46512a00bfce360f30a5cea (patch)
tree3a458d3c53bfe78d63c28fe520b2dd83b9a0d11f /src/send.c
parent8001cc147dded5bb8acefe6cb93d6defb3f92562 (diff)
Replaced anope_cmd_privmsg() and privmsg() with direct call to SendPrivmsg() in IRCDProto class.
Added SendPrivmsgInternal() function to IRCDProto class, now SendPrivmsg() is a stub to handle varargs. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1335 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/send.c')
-rw-r--r--src/send.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/src/send.c b/src/send.c
index 5911dda44..7474a380b 100644
--- a/src/send.c
+++ b/src/send.c
@@ -202,7 +202,7 @@ void notice_lang(const char *source, User * dest, int message, ...)
if (UsePrivmsg && ((!dest->na && (NSDefFlags & NI_MSG))
|| (dest->na
&& (dest->na->nc->flags & NI_MSG)))) {
- anope_cmd_privmsg(source, dest->nick, *t ? t : " ");
+ ircdproto->SendPrivmsg(source, dest->nick, *t ? t : " ");
} else {
ircdproto->SendNotice(source, dest->nick, *t ? t : " ");
}
@@ -258,7 +258,7 @@ void notice_help(const char *source, User * dest, int message, ...)
if (UsePrivmsg && ((!dest->na && (NSDefFlags & NI_MSG))
|| (dest->na
&& (dest->na->nc->flags & NI_MSG)))) {
- anope_cmd_privmsg(source, dest->nick, *outbuf ? outbuf : " ");
+ ircdproto->SendPrivmsg(source, dest->nick, *outbuf ? outbuf : " ");
} else {
ircdproto->SendNotice(source, dest->nick, *outbuf ? outbuf : " ");
}
@@ -287,37 +287,10 @@ void notice(char *source, const char *dest, const char *fmt, ...)
vsnprintf(buf, BUFSIZE - 1, fmt, args);
if (NSDefFlags & NI_MSG) {
- anope_cmd_privmsg(source, dest, buf);
+ ircdproto->SendPrivmsg(source, dest, buf);
} else {
ircdproto->SendNotice(source, dest, buf);
}
va_end(args);
}
}
-
-/*************************************************************************/
-
-/**
- * Send a PRIVMSG from the given source to the given nick.
- * @param source Orgin of the Message
- * @param dest Destination of the Message
- * @param fmt Format of the Message
- * @param ... any number of parameters
- * @return void
- */
-void privmsg(char *source, 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);
- }
-
- anope_cmd_privmsg(source, dest, buf);
-}
-
-