summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <adam@sigterm.info>2014-05-13 17:50:07 -0400
committerAdam <adam@sigterm.info>2014-05-13 17:50:07 -0400
commitbcc3ae5742da6b8ba58d8a213e35feea069b42a5 (patch)
tree71cf7fb1fe2032e6926a240d4b2245c25fb8721b
parent4e67e0897ac7ac5513527344b464093a9ace72d0 (diff)
parent76a953844100d8d1762a79053c4feba74ed4639c (diff)
Merge pull request #76 from miwob/master
Update ircd-hybrid protocol module
-rw-r--r--modules/protocol/hybrid.cpp22
-rw-r--r--src/base64.cpp2
2 files changed, 19 insertions, 5 deletions
diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp
index 84f7db001..7c2c14098 100644
--- a/modules/protocol/hybrid.cpp
+++ b/modules/protocol/hybrid.cpp
@@ -1,7 +1,7 @@
/* ircd-hybrid-8 protocol module
*
* (C) 2003-2014 Anope Team
- * (C) 2012-2013 by the Hybrid Development Team
+ * (C) 2012-2014 ircd-hybrid development team
*
* Please read COPYING and README for further details.
*
@@ -40,10 +40,11 @@ class HybridProto : public IRCDProto
{
DefaultPseudoclientModes = "+oi";
CanSVSNick = true;
+ CanSVSHold = true;
+ CanSVSJoin = true;
CanSNLine = true;
CanSQLine = true;
CanSZLine = true;
- CanSVSHold = true;
CanCertFP = true;
CanSetVHost = true;
RequiresID = true;
@@ -174,9 +175,9 @@ class HybridProto : public IRCDProto
void SendServer(const Server *server) anope_override
{
if (server == Me)
- UplinkSocket::Message() << "SERVER " << server->GetName() << " " << server->GetHops() << " :" << server->GetDescription();
+ UplinkSocket::Message() << "SERVER " << server->GetName() << " " << server->GetHops() + 1 << " :" << server->GetDescription();
else
- UplinkSocket::Message(Me) << "SID " << server->GetName() << " " << server->GetHops() << " " << server->GetSID() << " :" << server->GetDescription();
+ UplinkSocket::Message(Me) << "SID " << server->GetName() << " " << server->GetHops() + 1 << " " << server->GetSID() << " :" << server->GetDescription();
}
void SendConnect() anope_override
@@ -254,6 +255,19 @@ class HybridProto : public IRCDProto
UplinkSocket::Message(Me) << "SVSNICK " << u->nick << " " << newnick << " " << when;
}
+ void SendSVSJoin(const MessageSource &source, User *u, const Anope::string &chan, const Anope::string &) anope_override
+ {
+ UplinkSocket::Message(source) << "SVSJOIN " << u->GetUID() << " " << chan;
+ }
+
+ void SendSVSPart(const MessageSource &source, User *u, const Anope::string &chan, const Anope::string &param) anope_override
+ {
+ if (!param.empty())
+ UplinkSocket::Message(source) << "SVSPART " << u->GetUID() << " " << chan << " :" << param;
+ else
+ UplinkSocket::Message(source) << "SVSPART " << u->GetUID() << " " << chan;
+ }
+
void SendSVSHold(const Anope::string &nick, time_t t) anope_override
{
XLine x(nick, Me->GetName(), Anope::CurTime + t, "Being held for registered user");
diff --git a/src/base64.cpp b/src/base64.cpp
index d4d9ff43e..c00527d42 100644
--- a/src/base64.cpp
+++ b/src/base64.cpp
@@ -82,7 +82,7 @@ static const char Pad64 = '=';
void Anope::B64Encode(const Anope::string &src, Anope::string &target)
{
size_t src_pos = 0, src_len = src.length();
- unsigned char input[3];
+ unsigned char input[3] = { '\0', '\0', '\0' };
target.clear();