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 | |
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')
-rw-r--r-- | src/modules/m_cgiirc.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_check.cpp | 30 |
2 files changed, 32 insertions, 2 deletions
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 07cf3c376..01276275e 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -155,8 +155,8 @@ public: ServerInstance->Extensions.Register(&cmd.webirc_hostname); ServerInstance->Extensions.Register(&cmd.webirc_ip); - Implementation eventlist[] = { I_OnRehash, I_OnUserRegister, I_OnSyncUser, I_OnDecodeMetaData, I_OnUserDisconnect, I_OnUserConnect }; - ServerInstance->Modules->Attach(eventlist, this, 6); + Implementation eventlist[] = { I_OnRehash, I_OnUserRegister, I_OnDecodeMetaData, I_OnUserDisconnect, I_OnUserConnect }; + ServerInstance->Modules->Attach(eventlist, this, 5); } 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); |