summaryrefslogtreecommitdiff
path: root/send.c
diff options
context:
space:
mode:
authordane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-06-18 16:38:43 +0000
committerdane dane@31f1291d-b8d6-0310-a050-a5561fc1590b <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-06-18 16:38:43 +0000
commit1d1c478e4ff9c484be01ad0d55d5f3c0a91b2561 (patch)
treee2d601a6ee6a167671da595b22be602aaaa6c4a1 /send.c
parentbb020753879abb7ede7c0343f528027a2b99ebb2 (diff)
BUILD : 1.7.4 (206) BUGS : 55 NOTES : Added proper Bahamut1.8 support. Merged r132:195 from branch branches/proto/anope-bahamut18 which should now be obsolete.
git-svn-id: svn://svn.anope.org/anope/trunk@206 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@148 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'send.c')
-rw-r--r--send.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/send.c b/send.c
index c841020a2..0c21b65d3 100644
--- a/send.c
+++ b/send.c
@@ -80,6 +80,25 @@ void notice(const char *source, const char *dest, const char *fmt, ...)
/*************************************************************************/
+void notice_server(const char *source, Server * s, const char *fmt, ...)
+{
+ va_list args;
+ char buf[BUFSIZE];
+
+ va_start(args, fmt);
+
+ vsnprintf(buf, sizeof(buf), fmt, args);
+#ifdef IRC_HYBRID
+ send_cmd(source, "%s $$%s :%s", (UsePrivmsg ? "PRIVMSG" : "NOTICE"),
+ s->name, buf);
+#else
+ send_cmd(source, "%s $%s :%s", (UsePrivmsg ? "PRIVMSG" : "NOTICE"),
+ s->name, buf);
+#endif
+}
+
+/*************************************************************************/
+
void notice_user(const char *source, User * u, const char *fmt, ...)
{
va_list args;
@@ -200,3 +219,22 @@ void privmsg(const char *source, const char *dest, const char *fmt, ...)
}
/*************************************************************************/
+
+/* Sends a MODE from the given source on the given nick */
+void send_mode(const char *source, const char *on, const char *fmt, ...)
+{
+ va_list args;
+ char buf[BUFSIZE];
+
+ va_start(args, fmt);
+
+ vsnprintf(buf, sizeof(buf), fmt, args);
+#ifdef IRC_BAHAMUT
+ if (uplink_capab & CAPAB_TSMODE)
+ send_cmd(source, "MODE %s 0 %s", on, buf);
+ else
+#endif
+ send_cmd(source, "MODE %s %s", on, buf);
+}
+
+/*************************************************************************/