summaryrefslogtreecommitdiff
path: root/modules/protocol/ratbox.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-09-23 15:46:03 -0400
committerAdam <Adam@anope.org>2016-09-23 15:46:03 -0400
commit2916943316c0d3c53d347fb43abe98a374c75e36 (patch)
tree45611b5583dca607e9a513b6b2f7d88975c56231 /modules/protocol/ratbox.cpp
parenta6b14a9fb6afc5e16874ed7e4c0a135a4f5bfa53 (diff)
Remove rfc1459 message framing everywhere
Diffstat (limited to 'modules/protocol/ratbox.cpp')
-rw-r--r--modules/protocol/ratbox.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp
index 8aea359f5..f1a7c85da 100644
--- a/modules/protocol/ratbox.cpp
+++ b/modules/protocol/ratbox.cpp
@@ -53,12 +53,13 @@ class RatboxProto : public IRCDProto
void SendGlobopsInternal(const MessageSource &source, const Anope::string &buf) override
{
- UplinkSocket::Message(source) << "OPERWALL :" << buf;
+ Uplink::Send(source, "OPERWALL", buf);
}
void SendConnect() override
{
- UplinkSocket::Message() << "PASS " << Config->Uplinks[Anope::CurrentUplink].password << " TS 6 :" << Me->GetSID();
+ Uplink::Send("PASS", Config->Uplinks[Anope::CurrentUplink].password, "TS", 6, Me->GetSID());
+
/*
QS - Can handle quit storm removal
EX - Can do channel +e exemptions
@@ -69,9 +70,11 @@ class RatboxProto : public IRCDProto
TB - supports topic burst
ENCAP - supports ENCAP
*/
- UplinkSocket::Message() << "CAPAB :QS EX CHW IE GLN TB ENCAP";
+ Uplink::Send("CAPAB", "QS EX CHW IE GLN TB ENCAP");
+
/* Make myself known to myself in the serverlist */
SendServer(Me);
+
/*
* SVINFO
* parv[0] = sender prefix
@@ -80,13 +83,13 @@ class RatboxProto : public IRCDProto
* parv[3] = server is standalone or connected to non-TS only
* parv[4] = server's idea of UTC time
*/
- UplinkSocket::Message() << "SVINFO 6 3 0 :" << Anope::CurTime;
+ Uplink::Send("SVINFO", 6, 6, 0, Anope::CurTime);
}
void SendClientIntroduction(User *u) override
{
Anope::string modes = "+" + u->GetModes();
- UplinkSocket::Message(Me) << "UID " << u->nick << " 1 " << u->timestamp << " " << modes << " " << u->GetIdent() << " " << u->host << " 0 " << u->GetUID() << " :" << u->realname;
+ Uplink::Send(Me, "UID", u->nick, 1, u->timestamp, modes, u->GetIdent(), u->host, 0, u->GetUID(), u->realname);
}
void SendLogin(User *u, NickServ::Nick *na) override
@@ -94,12 +97,12 @@ class RatboxProto : public IRCDProto
if (na->GetAccount()->HasFieldS("UNCONFIRMED"))
return;
- UplinkSocket::Message(Me) << "ENCAP * SU " << u->GetUID() << " " << na->GetAccount()->GetDisplay();
+ Uplink::Send(Me, "ENCAP", "*", "SU", u->GetUID(), na->GetAccount()->GetDisplay());
}
void SendLogout(User *u) override
{
- UplinkSocket::Message(Me) << "ENCAP * SU " << u->GetUID();
+ Uplink::Send(Me, "ENCAP", "*", "SU", u->GetUID());
}
void SendTopic(const MessageSource &source, Channel *c) override
@@ -290,6 +293,7 @@ class ProtoRatbox : public Module
m_hybrid = ModuleManager::FindModule("hybrid");
if (!m_hybrid)
throw ModuleException("Unable to find hybrid");
+#warning ""
// if (!hybrid)
// throw ModuleException("No protocol interface for hybrid");
}