summaryrefslogtreecommitdiff
path: root/src/send.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/send.cpp')
-rw-r--r--src/send.cpp93
1 files changed, 0 insertions, 93 deletions
diff --git a/src/send.cpp b/src/send.cpp
deleted file mode 100644
index 28c1ca08c..000000000
--- a/src/send.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Routines for sending stuff to the network.
- *
- * (C) 2003-2011 Anope Team
- * Contact us at team@anope.org
- *
- * Please read COPYING and README for further details.
- *
- * Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- */
-
-#include "services.h"
-
-/*************************************************************************/
-
-/**
- * Send a command to the server. The two forms here are like
- * printf()/vprintf() and friends.
- * @param source Orgin of the Message (some times NULL)
- * @param fmt Format of the Message
- * @param ... any number of parameters
- * @return void
- */
-void send_cmd(const Anope::string &source, const char *fmt, ...)
-{
- va_list args;
- char buf[BUFSIZE] = "";
-
- va_start(args, fmt);
-
- vsnprintf(buf, BUFSIZE - 1, fmt, args);
-
- if (!UplinkSock)
- {
- if (!source.empty())
- Log(LOG_DEBUG) << "Attempted to send \"" << source << " " << buf << "\" with UplinkSock NULL";
- else
- Log(LOG_DEBUG) << "Attempted to send \"" << buf << "\" with UplinkSock NULL";
- return;
- }
-
- if (!source.empty() && source.find(".") == Anope::string::npos)
- {
- BotInfo *bi = findbot(source);
- if (bi != NULL && bi->introduced == false)
- {
- Log(LOG_DEBUG) << "Attempted to send \"" << source << " " << buf << "\" with source not introduced";
- return;
- }
- }
-
- if (!source.empty())
- {
- UplinkSock->Write(":%s %s", source.c_str(), buf);
- Log(LOG_RAWIO) << "Sent: :" << source << " " << buf;
- }
- else
- {
- UplinkSock->Write(buf);
- Log(LOG_RAWIO) << "Sent: " << buf;
- }
-
- va_end(args);
-}
-
-/*************************************************************************/
-
-/**
- * Send a server notice
- * @param source Orgin of the Message
- * @param s Server Struct
- * @param fmt Format of the Message
- * @param ... any number of parameters
- * @return void
- */
-void notice_server(const Anope::string &source, const Server *s, const char *fmt, ...)
-{
- if (fmt)
- {
- va_list args;
- char buf[BUFSIZE] = "";
-
- va_start(args, fmt);
- vsnprintf(buf, BUFSIZE - 1, fmt, args);
-
- if (Config->NSDefFlags.HasFlag(NI_MSG))
- ircdproto->SendGlobalPrivmsg(findbot(source), s, buf);
- else
- ircdproto->SendGlobalNotice(findbot(source), s, buf);
- va_end(args);
- }
-}
-