diff options
| author | Adam <Adam@anope.org> | 2011-09-19 18:35:40 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2011-09-19 18:35:40 -0400 |
| commit | 43201ead9575a74e350710bc191f4ac67366aca7 (patch) | |
| tree | e83dd66b689181548647d80e8d181eb13d190ba7 /modules | |
| parent | 7dce64e5400b180f1645c683614ecc3eee2bfddd (diff) | |
Fixed /os reload doing weird things to service channels, and allow setting modes by clients on burst
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/protocol/bahamut.cpp | 7 | ||||
| -rw-r--r-- | modules/protocol/inspircd-ts6.h | 7 | ||||
| -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, 26 insertions, 11 deletions
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index 008c4dd32..2ae061009 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -162,14 +162,17 @@ class BahamutIRCdProto : public IRCDProto } /* JOIN - SJOIN */ - void SendJoin(User *user, Channel *c, const ChannelStatus *status) + void SendJoin(User *user, Channel *c, ChannelStatus *status) { send_cmd(user->nick, "SJOIN %ld %s", static_cast<long>(c->creation_time), c->name.c_str()); if (status) { + ChannelStatus cs = *status; + status->ClearFlags(); + BotInfo *setter = findbot(user->nick); for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i) - if (status->HasFlag(ModeManager::ChannelModes[i]->Name)) + if (cs.HasFlag(ModeManager::ChannelModes[i]->Name)) c->SetMode(setter, ModeManager::ChannelModes[i], user->nick, false); } } diff --git a/modules/protocol/inspircd-ts6.h b/modules/protocol/inspircd-ts6.h index 3603555c4..2eab151cf 100644 --- a/modules/protocol/inspircd-ts6.h +++ b/modules/protocol/inspircd-ts6.h @@ -124,7 +124,7 @@ class InspIRCdTS6Proto : public IRCDProto } /* JOIN */ - void SendJoin(User *user, Channel *c, const ChannelStatus *status) + void SendJoin(User *user, Channel *c, 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,9 +133,12 @@ class InspIRCdTS6Proto : public IRCDProto */ if (status) { + ChannelStatus cs = *status; + status->ClearFlags(); + BotInfo *setter = findbot(user->nick); for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i) - if (status->HasFlag(ModeManager::ChannelModes[i]->Name)) + if (cs.HasFlag(ModeManager::ChannelModes[i]->Name)) c->SetMode(setter, ModeManager::ChannelModes[i], user->nick, false); } } diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp index 8b51c93a6..6d72c5d61 100644 --- a/modules/protocol/inspircd11.cpp +++ b/modules/protocol/inspircd11.cpp @@ -157,14 +157,17 @@ class InspIRCdProto : public IRCDProto } /* JOIN */ - void SendJoin(User *user, Channel *c, const ChannelStatus *status) + void SendJoin(User *user, Channel *c, ChannelStatus *status) { send_cmd(user->nick, "JOIN %s %ld", c->name.c_str(), static_cast<long>(c->creation_time)); if (status) { + ChannelStatus cs = *status; + status->ClearFlags(); + BotInfo *setter = findbot(user->nick); for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i) - if (status->HasFlag(ModeManager::ChannelModes[i]->Name)) + if (cs.HasFlag(ModeManager::ChannelModes[i]->Name)) c->SetMode(setter, ModeManager::ChannelModes[i], user->nick, false); } } diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index f31bfea6a..3b108b470 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -123,14 +123,17 @@ class PlexusProto : public IRCDProto send_cmd(Config->Numeric, "UNRESV * %s", x->Mask.c_str()); } - void SendJoin(User *user, Channel *c, const ChannelStatus *status) + void SendJoin(User *user, Channel *c, 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) { + ChannelStatus cs = *status; + status->ClearFlags(); + BotInfo *setter = findbot(user->nick); for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i) - if (status->HasFlag(ModeManager::ChannelModes[i]->Name)) + if (cs.HasFlag(ModeManager::ChannelModes[i]->Name)) c->SetMode(setter, ModeManager::ChannelModes[i], user->nick, false); } } diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index 957564890..2a135287b 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -126,7 +126,7 @@ class RatboxProto : public IRCDProto send_cmd(Config->Numeric, "UNRESV * %s", x->Mask.c_str()); } - void SendJoin(User *user, Channel *c, const ChannelStatus *status) + void SendJoin(User *user, Channel *c, 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 cb6ec2091..d3d0ba1dd 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -165,14 +165,17 @@ class UnrealIRCdProto : public IRCDProto } /* JOIN */ - void SendJoin(User *user, Channel *c, const ChannelStatus *status) + void SendJoin(User *user, Channel *c, 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) { + ChannelStatus cs = *status; + status->ClearFlags(); + BotInfo *setter = findbot(user->nick); for (unsigned i = 0; i < ModeManager::ChannelModes.size(); ++i) - if (status->HasFlag(ModeManager::ChannelModes[i]->Name)) + if (cs.HasFlag(ModeManager::ChannelModes[i]->Name)) c->SetMode(setter, ModeManager::ChannelModes[i], user->nick, false); } } |
