diff options
-rw-r--r-- | include/sockets.h | 2 | ||||
-rw-r--r-- | src/socket_transport.cpp | 30 |
2 files changed, 0 insertions, 32 deletions
diff --git a/include/sockets.h b/include/sockets.h index afc335c4f..ae4dda289 100644 --- a/include/sockets.h +++ b/include/sockets.h @@ -310,7 +310,6 @@ class CoreExport BufferedSocket : public virtual Socket protected: virtual void Write(const char *buffer, size_t l); public: - void Write(const char *message, ...); void Write(const Anope::string &message); /** Get the length of the read buffer @@ -359,7 +358,6 @@ class CoreExport BinarySocket : public virtual Socket * @param l The length of the data; if 0 then this function returns without doing anything */ virtual void Write(const char *buffer, size_t l); - void Write(const char *message, ...); void Write(const Anope::string &message); /** Called with data from the socket diff --git a/src/socket_transport.cpp b/src/socket_transport.cpp index 2ffeadd03..6b17aa5b7 100644 --- a/src/socket_transport.cpp +++ b/src/socket_transport.cpp @@ -80,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()); @@ -180,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()); |