diff options
Diffstat (limited to 'src/modules/m_check.cpp')
-rw-r--r-- | src/modules/m_check.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index a907b06e8..831a8ba39 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -157,6 +157,20 @@ class CommandCheck : public Command user->SendText(checkstr + " member " + tmpbuf); } + irc::modestacker modestack(true); + std::string letter_b("b"); + for(BanList::iterator b = targchan->bans.begin(); b != targchan->bans.end(); ++b) + { + modestack.Push('b', b->data); + } + std::vector<std::string> stackresult; + std::vector<TranslateType> dummy; + while (modestack.GetStackedLine(stackresult)) + { + creator->ProtoSendMode(user, TYPE_CHANNEL, targchan, stackresult, dummy); + stackresult.clear(); + } + FOREACH_MOD(I_OnSyncChannel,OnSyncChannel(targchan,creator,user)); dumpExt(user, checkstr, targchan); } else @@ -211,6 +225,22 @@ class ModuleCheck : public Module { } + void ProtoSendMode(void* uv, TargetTypeFlags, void*, const std::vector<std::string>& result, const std::vector<TranslateType>&) + { + User* user = (User*)uv; + std::string checkstr(":"); + checkstr.append(ServerInstance->Config->ServerName); + checkstr.append(" 304 "); + checkstr.append(user->nick); + checkstr.append(" :CHECK modelist"); + for(unsigned int i=0; i < result.size(); i++) + { + checkstr.append(" "); + checkstr.append(result[i]); + } + user->SendText(checkstr); + } + Version GetVersion() { return Version("CHECK command, view user/channel details", VF_VENDOR|VF_OPTCOMMON); |