mirror of
https://github.com/anope/anope.git
synced 2026-07-05 14:43:12 +02:00
Fixed accidentally clearing botmodes when joins are sent
This commit is contained in:
+1
-1
@@ -819,7 +819,7 @@ class CoreExport IRCDProto
|
||||
virtual void SendQuit(const User *u, const char *fmt, ...);
|
||||
virtual void SendPing(const Anope::string &servname, const Anope::string &who);
|
||||
virtual void SendPong(const Anope::string &servname, const Anope::string &who);
|
||||
virtual void SendJoin(User *, Channel *, ChannelStatus *) = 0;
|
||||
virtual void SendJoin(User *, Channel *, const ChannelStatus *) = 0;
|
||||
virtual void SendSQLineDel(const XLine *x) { }
|
||||
virtual void SendInvite(const BotInfo *bi, const Anope::string &chan, const Anope::string &nick);
|
||||
virtual void SendPart(const BotInfo *bi, const Channel *chan, const char *fmt, ...);
|
||||
|
||||
@@ -162,13 +162,19 @@ class BahamutIRCdProto : public IRCDProto
|
||||
}
|
||||
|
||||
/* JOIN - SJOIN */
|
||||
void SendJoin(User *user, Channel *c, ChannelStatus *status)
|
||||
void SendJoin(User *user, Channel *c, const ChannelStatus *status)
|
||||
{
|
||||
send_cmd(user->nick, "SJOIN %ld %s", static_cast<long>(c->creation_time), c->name.c_str());
|
||||
if (status)
|
||||
{
|
||||
/* First save the channel status incase uc->Status == status */
|
||||
ChannelStatus cs = *status;
|
||||
status->ClearFlags();
|
||||
/* If the user is internally on the channel with flags, kill them so that
|
||||
* the stacker will allow this.
|
||||
*/
|
||||
UserContainer *uc = c->FindUser(user);
|
||||
if (uc != NULL)
|
||||
uc->Status->ClearFlags();
|
||||
|
||||
BotInfo *setter = findbot(user->nick);
|
||||
for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i)
|
||||
|
||||
@@ -124,7 +124,7 @@ class InspIRCdTS6Proto : public IRCDProto
|
||||
}
|
||||
|
||||
/* JOIN */
|
||||
void SendJoin(User *user, Channel *c, ChannelStatus *status)
|
||||
void SendJoin(User *user, Channel *c, const ChannelStatus *status)
|
||||
{
|
||||
send_cmd(Config->Numeric, "FJOIN %s %ld +%s :,%s", c->name.c_str(), static_cast<long>(c->creation_time), c->GetModes(true, true).c_str(), user->GetUID().c_str());
|
||||
/* Note that we can send this with the FJOIN but choose not to
|
||||
@@ -133,8 +133,14 @@ class InspIRCdTS6Proto : public IRCDProto
|
||||
*/
|
||||
if (status)
|
||||
{
|
||||
/* First save the channel status incase uc->Status == status */
|
||||
ChannelStatus cs = *status;
|
||||
status->ClearFlags();
|
||||
/* If the user is internally on the channel with flags, kill them so that
|
||||
* the stacker will allow this.
|
||||
*/
|
||||
UserContainer *uc = c->FindUser(user);
|
||||
if (uc != NULL)
|
||||
uc->Status->ClearFlags();
|
||||
|
||||
BotInfo *setter = findbot(user->nick);
|
||||
for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i)
|
||||
|
||||
@@ -157,13 +157,19 @@ class InspIRCdProto : public IRCDProto
|
||||
}
|
||||
|
||||
/* JOIN */
|
||||
void SendJoin(User *user, Channel *c, ChannelStatus *status)
|
||||
void SendJoin(User *user, Channel *c, const ChannelStatus *status)
|
||||
{
|
||||
send_cmd(user->nick, "JOIN %s %ld", c->name.c_str(), static_cast<long>(c->creation_time));
|
||||
if (status)
|
||||
{
|
||||
/* First save the channel status incase uc->Status == status */
|
||||
ChannelStatus cs = *status;
|
||||
status->ClearFlags();
|
||||
/* If the user is internally on the channel with flags, kill them so that
|
||||
* the stacker will allow this.
|
||||
*/
|
||||
UserContainer *uc = c->FindUser(user);
|
||||
if (uc != NULL)
|
||||
uc->Status->ClearFlags();
|
||||
|
||||
BotInfo *setter = findbot(user->nick);
|
||||
for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i)
|
||||
|
||||
@@ -123,13 +123,19 @@ class PlexusProto : public IRCDProto
|
||||
send_cmd(Config->Numeric, "UNRESV * %s", x->Mask.c_str());
|
||||
}
|
||||
|
||||
void SendJoin(User *user, Channel *c, ChannelStatus *status)
|
||||
void SendJoin(User *user, Channel *c, const ChannelStatus *status)
|
||||
{
|
||||
send_cmd(Config->Numeric, "SJOIN %ld %s +%s :%s", static_cast<long>(c->creation_time), c->name.c_str(), c->GetModes(true, true).c_str(), user->GetUID().c_str());
|
||||
if (status)
|
||||
{
|
||||
/* First save the channel status incase uc->Status == status */
|
||||
ChannelStatus cs = *status;
|
||||
status->ClearFlags();
|
||||
/* If the user is internally on the channel with flags, kill them so that
|
||||
* the stacker will allow this.
|
||||
*/
|
||||
UserContainer *uc = c->FindUser(user);
|
||||
if (uc != NULL)
|
||||
uc->Status->ClearFlags();
|
||||
|
||||
BotInfo *setter = findbot(user->nick);
|
||||
for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i)
|
||||
|
||||
@@ -126,7 +126,7 @@ class RatboxProto : public IRCDProto
|
||||
send_cmd(Config->Numeric, "UNRESV * %s", x->Mask.c_str());
|
||||
}
|
||||
|
||||
void SendJoin(User *user, Channel *c, ChannelStatus *status)
|
||||
void SendJoin(User *user, Channel *c, const ChannelStatus *status)
|
||||
{
|
||||
/* Note that we must send our modes with the SJOIN and
|
||||
* can not add them to the mode stacker because ratbox
|
||||
|
||||
@@ -165,13 +165,19 @@ class UnrealIRCdProto : public IRCDProto
|
||||
}
|
||||
|
||||
/* JOIN */
|
||||
void SendJoin(User *user, Channel *c, ChannelStatus *status)
|
||||
void SendJoin(User *user, Channel *c, const ChannelStatus *status)
|
||||
{
|
||||
send_cmd(Config->ServerName, "~ %ld %s :%s", static_cast<long>(c->creation_time), c->name.c_str(), user->nick.c_str());
|
||||
if (status)
|
||||
{
|
||||
/* First save the channel status incase uc->Status == status */
|
||||
ChannelStatus cs = *status;
|
||||
status->ClearFlags();
|
||||
/* If the user is internally on the channel with flags, kill them so that
|
||||
* the stacker will allow this.
|
||||
*/
|
||||
UserContainer *uc = c->FindUser(user);
|
||||
if (uc != NULL)
|
||||
uc->Status->ClearFlags();
|
||||
|
||||
BotInfo *setter = findbot(user->nick);
|
||||
for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i)
|
||||
|
||||
Reference in New Issue
Block a user