diff options
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); |