diff options
Diffstat (limited to 'modules/protocol')
-rw-r--r-- | modules/protocol/bahamut.cpp | 7 | ||||
-rw-r--r-- | modules/protocol/inspircd-ts6.h | 12 | ||||
-rw-r--r-- | modules/protocol/inspircd11.cpp | 7 | ||||
-rw-r--r-- | modules/protocol/plexus.cpp | 7 | ||||
-rw-r--r-- | modules/protocol/ratbox.cpp | 2 | ||||
-rw-r--r-- | modules/protocol/unreal.cpp | 7 |
6 files changed, 27 insertions, 15 deletions
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index 29f16004e..ff2cab4d2 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -161,13 +161,16 @@ class BahamutIRCdProto : public IRCDProto } /* JOIN - SJOIN */ - void SendJoin(BotInfo *user, Channel *c, const 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) + { + 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); + } } void SendAkill(User *, const XLine *x) 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) diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp index a382d4006..1790aaa84 100644 --- a/modules/protocol/inspircd11.cpp +++ b/modules/protocol/inspircd11.cpp @@ -160,13 +160,16 @@ class InspIRCdProto : public IRCDProto } /* JOIN */ - void SendJoin(BotInfo *user, Channel *c, const 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) + { + 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 */ diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index 5e6c67781..c83aa786e 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -122,13 +122,16 @@ class PlexusProto : public IRCDProto send_cmd(Config->Numeric, "UNRESV * %s", x->Mask.c_str()); } - void SendJoin(BotInfo *user, Channel *c, const 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) + { + 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); + } } void SendAkill(User *, const XLine *x) diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index 2833c52b7..13a5e287a 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -125,7 +125,7 @@ class RatboxProto : public IRCDProto send_cmd(Config->Numeric, "UNRESV * %s", x->Mask.c_str()); } - void SendJoin(BotInfo *user, Channel *c, const 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 diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index e07b97af0..9e7768ef3 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -172,13 +172,16 @@ class UnrealIRCdProto : public IRCDProto } /* JOIN */ - void SendJoin(BotInfo *user, Channel *c, const 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) + { + 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 |