1
0
mirror of https://github.com/anope/anope.git synced 2026-07-10 19:03:13 +02:00

Merge pull request #145 from miwob/style+copyright

Style+copyright
This commit is contained in:
Adam
2016-01-23 09:19:08 -06:00
+19 -18
View File
@@ -1,7 +1,7 @@
/* ircd-hybrid-8 protocol module
*
* (C) 2003-2014 Anope Team
* (C) 2012-2015 ircd-hybrid development team
* (C) 2012-2016 ircd-hybrid development team
*
* Please read COPYING and README for further details.
*
@@ -19,6 +19,7 @@ class HybridProto : public IRCDProto
BotInfo *FindIntroduced()
{
BotInfo *bi = Config->GetClient("OperServ");
if (bi && bi->introduced)
return bi;
@@ -29,9 +30,9 @@ class HybridProto : public IRCDProto
return NULL;
}
void SendSVSKillInternal(const MessageSource &source, User *user, const Anope::string &buf) anope_override
void SendSVSKillInternal(const MessageSource &source, User *u, const Anope::string &buf) anope_override
{
IRCDProto::SendSVSKillInternal(source, user, buf);
IRCDProto::SendSVSKillInternal(source, u, buf);
user->KillInternal(source, buf);
}
@@ -111,23 +112,21 @@ class HybridProto : public IRCDProto
UplinkSocket::Message(Config->GetClient("OperServ")) << "UNRESV * " << x->mask;
}
void SendJoin(User *user, Channel *c, const ChannelStatus *status) anope_override
void SendJoin(User *u, Channel *c, const ChannelStatus *status) anope_override
{
/*
* Note that we must send our modes with the SJOIN and
* can not add them to the mode stacker because ircd-hybrid
* does not allow *any* client to op itself
* Note that we must send our modes with the SJOIN and can not add them to the
* mode stacker because ircd-hybrid does not allow *any* client to op itself
*/
UplinkSocket::Message() << "SJOIN " << c->creation_time << " " << c->name << " +"
<< c->GetModes(true, true) << " :"
<< (status != NULL ? status->BuildModePrefixList() : "") << user->GetUID();
UplinkSocket::Message() << "SJOIN " << c->creation_time << " " << c->name << " +" << c->GetModes(true, true) << " :"
<< (status != NULL ? status->BuildModePrefixList() : "") << u->GetUID();
/* And update our internal status for this user since this is not going through our mode handling system */
if (status != NULL)
if (status)
{
ChanUserContainer *uc = c->FindUser(user);
ChanUserContainer *uc = c->FindUser(u);
if (uc != NULL)
if (uc)
uc->status = *status;
}
}
@@ -186,22 +185,20 @@ class HybridProto : public IRCDProto
UplinkSocket::Message() << "PASS " << Config->Uplinks[Anope::CurrentUplink].password << " TS 6 :" << Me->GetSID();
/*
* As of October 13, 2012, ircd-hybrid-8 does support the following capabilities
* As of January 13, 2016, ircd-hybrid-8 does support the following capabilities
* which are required to work with IRC-services:
*
* QS - Can handle quit storm removal
* EX - Can do channel +e exemptions
* CHW - Can do channel wall @#
* IE - Can do invite exceptions
* KNOCK - Supports KNOCK
* CHW - Can do channel wall @#
* TBURST - Supports topic burst
* ENCAP - Supports ENCAP
* HOPS - Supports HalfOps
* SVS - Supports services
* EOB - Supports End Of Burst message
* TS6 - Capable of TS6 support
*/
UplinkSocket::Message() << "CAPAB :QS EX CHW IE ENCAP TBURST SVS HOPS EOB TS6";
UplinkSocket::Message() << "CAPAB :QS EX CHW IE ENCAP TBURST SVS HOPS EOB";
SendServer(Me);
@@ -330,6 +327,7 @@ struct IRCDMessageBMask : IRCDMessage
{
spacesepstream bans(params[3]);
Anope::string token;
while (bans.GetToken(token))
c->SetModeInternal(source, mode, token);
}
@@ -436,9 +434,11 @@ struct IRCDMessageSJoin : IRCDMessage
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override
{
Anope::string modes;
if (params.size() >= 3)
for (unsigned i = 2; i < params.size() - 1; ++i)
modes += " " + params[i];
if (!modes.empty())
modes.erase(modes.begin());
@@ -486,6 +486,7 @@ struct IRCDMessageSVSMode : IRCDMessage
void Run(MessageSource &source, const std::vector<Anope::string> &params) anope_override
{
User *u = User::Find(params[0]);
if (!u)
return;