diff options
author | Adam <Adam@anope.org> | 2013-09-14 04:18:56 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-09-27 19:10:49 -0400 |
commit | dcb3ff7d343f4ac2db55def9895ed459c1e3f417 (patch) | |
tree | 9092dffc3e3a294dc2462b940da8a38e0dbba95d /modules | |
parent | 1107b92699407f80fcfa9e12a491468d6f57b1d9 (diff) |
Dont send BURST twice on inspircd
Drop matching nicks on forbid.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/commands/os_forbid.cpp | 20 | ||||
-rw-r--r-- | modules/protocol/inspircd12.cpp | 7 |
2 files changed, 22 insertions, 5 deletions
diff --git a/modules/commands/os_forbid.cpp b/modules/commands/os_forbid.cpp index 0099348b0..ec498a3ba 100644 --- a/modules/commands/os_forbid.cpp +++ b/modules/commands/os_forbid.cpp @@ -172,9 +172,29 @@ class CommandOSForbid : public Command switch (ftype) { case FT_NICK: + { + int na_matches = 0; + for (user_map::const_iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) module->OnUserNickChange(it->second, ""); + + for (nickalias_map::const_iterator it = NickAliasList->begin(), it_end = NickAliasList->end(); it != it_end;) + { + NickAlias *na = it->second; + ++it; + + d = this->fs->FindForbid(na->nick, FT_NICK); + if (d == NULL) + continue; + + ++na_matches; + + delete na; + } + + source.Reply(_("\2%d\2 nicknames dropped."), na_matches); break; + } case FT_CHAN: { int chan_matches = 0, ci_matches = 0; diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp index 5e58a7704..ab32f76a7 100644 --- a/modules/protocol/inspircd12.cpp +++ b/modules/protocol/inspircd12.cpp @@ -294,8 +294,6 @@ class InspIRCd12Proto : public IRCDProto SendAddLine("Q", x->mask, timeleft, x->by, x->GetReason()); } - /* Functions that use serval cmd functions */ - void SendVhost(User *u, const Anope::string &vIdent, const Anope::string &vhost) anope_override { if (!vIdent.empty()) @@ -307,9 +305,6 @@ class InspIRCd12Proto : public IRCDProto void SendConnect() anope_override { SendServer(Me); - UplinkSocket::Message(Me) << "BURST"; - Module *enc = ModuleManager::FindFirstOf(ENCRYPTION); - UplinkSocket::Message(Me) << "VERSION :Anope-" << Anope::Version() << " " << Me->GetName() << " :" << IRCD->GetProtocolName() << " - (" << (enc ? enc->name : "none") << ") -- " << Anope::VersionBuildString(); } /* SVSHOLD - set */ @@ -363,6 +358,8 @@ class InspIRCd12Proto : public IRCDProto void SendBOB() anope_override { UplinkSocket::Message(Me) << "BURST " << Anope::CurTime; + Module *enc = ModuleManager::FindFirstOf(ENCRYPTION); + UplinkSocket::Message(Me) << "VERSION :Anope-" << Anope::Version() << " " << Me->GetName() << " :" << IRCD->GetProtocolName() << " - (" << (enc ? enc->name : "none") << ") -- " << Anope::VersionBuildString(); } void SendEOB() anope_override |