diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-05 19:02:36 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-05 19:02:36 +0000 |
commit | 9bac1580319dacbb95ac22b906d3ee949e23db41 (patch) | |
tree | d34fb1f79dee3e8ed619b7a87022e95feae81c78 /src/modules/m_check.cpp | |
parent | 3396bbbcb08750a2dea1497047da52e0b3c2f2a6 (diff) |
Show channel listmodes (+beIg) in /CHECK output
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12243 e03df62e-2008-0410-955e-edbf42e46eb7
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); |