summaryrefslogtreecommitdiff
path: root/src/socket_transport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket_transport.cpp')
-rw-r--r--src/socket_transport.cpp49
1 files changed, 14 insertions, 35 deletions
diff --git a/src/socket_transport.cpp b/src/socket_transport.cpp
index 60f7acbdb..b8afce990 100644
--- a/src/socket_transport.cpp
+++ b/src/socket_transport.cpp
@@ -1,12 +1,20 @@
/*
+ * Anope IRC Services
*
- * (C) 2003-2017 Anope Team
- * Contact us at team@anope.org
+ * Copyright (C) 2011-2017 Anope Team <team@anope.org>
*
- * Please read COPYING and README for further details.
+ * This file is part of Anope. Anope is free software; you can
+ * redistribute it and/or modify it under the terms of the GNU
+ * General Public License as published by the Free Software
+ * Foundation, version 2.
*
- * Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see see <http://www.gnu.org/licenses/>.
*/
#include "services.h"
@@ -72,21 +80,6 @@ void BufferedSocket::Write(const char *buffer, size_t l)
SocketEngine::Change(this, true, SF_WRITABLE);
}
-void BufferedSocket::Write(const char *message, ...)
-{
- va_list vi;
- char tbuffer[BUFSIZE];
-
- if (!message)
- return;
-
- va_start(vi, message);
- int len = vsnprintf(tbuffer, sizeof(tbuffer), message, vi);
- va_end(vi);
-
- this->Write(tbuffer, std::min(len, static_cast<int>(sizeof(tbuffer))));
-}
-
void BufferedSocket::Write(const Anope::string &message)
{
this->Write(message.c_str(), message.length());
@@ -172,21 +165,6 @@ void BinarySocket::Write(const char *buffer, size_t l)
SocketEngine::Change(this, true, SF_WRITABLE);
}
-void BinarySocket::Write(const char *message, ...)
-{
- va_list vi;
- char tbuffer[BUFSIZE];
-
- if (!message)
- return;
-
- va_start(vi, message);
- int len = vsnprintf(tbuffer, sizeof(tbuffer), message, vi);
- va_end(vi);
-
- this->Write(tbuffer, std::min(len, static_cast<int>(sizeof(tbuffer))));
-}
-
void BinarySocket::Write(const Anope::string &message)
{
this->Write(message.c_str(), message.length());
@@ -196,3 +174,4 @@ bool BinarySocket::Read(const char *buffer, size_t l)
{
return true;
}
+