summaryrefslogtreecommitdiff
path: root/modules/protocol/inspircd-ts6.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-06-02 14:59:34 -0400
committerAdam <Adam@anope.org>2011-06-02 14:59:34 -0400
commit3ad93a31c91ae096d5e53deb7dd64586fa935244 (patch)
tree46a53929245681c142cb58c25d20754ac1f15fc8 /modules/protocol/inspircd-ts6.h
parent184b346166db9d40fcdc7bb6bf3a7929fdd48be9 (diff)
Burst our channels with the uplink when we connect & fixed bug #1274
Diffstat (limited to 'modules/protocol/inspircd-ts6.h')
-rw-r--r--modules/protocol/inspircd-ts6.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/protocol/inspircd-ts6.h b/modules/protocol/inspircd-ts6.h
index cf93865f8..54a615aaf 100644
--- a/modules/protocol/inspircd-ts6.h
+++ b/modules/protocol/inspircd-ts6.h
@@ -128,7 +128,7 @@ class InspIRCdTS6Proto : public IRCDProto
}
/* JOIN */
- void SendJoin(BotInfo *user, Channel *c, const 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
@@ -136,9 +136,12 @@ class InspIRCdTS6Proto : public IRCDProto
* merge these modes with +nrt and other mlocked modes
*/
if (status)
+ {
+ BotInfo *setter = findbot(user->nick);
for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i)
if (status->HasFlag(ModeManager::ChannelModes[i]->Name))
- c->SetMode(user, ModeManager::ChannelModes[i], user->nick, false);
+ c->SetMode(setter, ModeManager::ChannelModes[i], user->nick, false);
+ }
}
/* UNSQLINE */
@@ -245,10 +248,7 @@ class InspIRCdTS6Proto : public IRCDProto
void SendChannel(Channel *c)
{
- Anope::string modes = c->GetModes(true, true);
- if (modes.empty())
- modes = "+";
- send_cmd(Config->Numeric, "FJOIN %s %ld %s :", c->name.c_str(), static_cast<long>(c->creation_time), modes.c_str());
+ send_cmd(Config->Numeric, "FJOIN %s %ld +%s :", c->name.c_str(), static_cast<long>(c->creation_time), c->GetModes(true, true).c_str());
}
bool IsNickValid(const Anope::string &nick)