1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 16:16:38 +02:00

Remove send_cmd and replace it with a stringstream

This commit is contained in:
Adam
2011-11-25 00:44:31 -05:00
parent 12d0a7302f
commit cef3eb78df
17 changed files with 417 additions and 581 deletions
+15 -6
View File
@@ -117,6 +117,21 @@ class UplinkSocket : public ConnectionSocket, public BufferedSocket
bool Read(const Anope::string &);
void OnConnect();
void OnError(const Anope::string &);
class CoreExport Message
{
Anope::string source;
std::stringstream buffer;
public:
Message();
Message(const Anope::string &);
~Message();
template<typename T> Message &operator<<(const T &val)
{
this->buffer << val;
return *this;
}
};
};
E UplinkSocket *UplinkSock;
E int CurrentUplink;
@@ -200,12 +215,6 @@ E bool is_on_access(const User *u, const NickCore *nc);
E void process(const Anope::string &buf);
/**** send.c ****/
E void send_cmd(const Anope::string &source, const char *fmt, ...) FORMAT(printf, 2, 3);
E void notice_server(const Anope::string &source, const Server *s, const char *fmt, ...) FORMAT(printf, 3, 4);
/**** sockets.cpp ****/
E int32_t TotalRead;