From 409e3a5c8439b0d22524aeb802b04be3b9983fc5 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 13 Apr 2005 13:02:20 +0000 Subject: Added Module::OnSendList git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1072 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_chanprotect.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/modules') diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index 65a7b0e84..5a8e40a36 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -279,6 +279,35 @@ class ModuleChanProtect : public Module } return 0; } + + virtual void OnSendList(userrec* user, chanrec* channel, char mode) + { + if (mode == 'q') + { + chanuserlist cl = Srv->GetUsers(channel); + for (int i = 0; i < cl.size(); i++) + { + if (cl[i]->GetExt("cm_founder_"+std::string(channel->name))) + { + WriteServ(user->fd,"386 %s %s %s",user->nick, channel->name,cl[i]->nick); + } + } + WriteServ(user->fd,"387 %s %s :End of channel founder list",user->nick, channel->name); + } + if (mode == 'a') + { + chanuserlist cl = Srv->GetUsers(channel); + for (int i = 0; i < cl.size(); i++) + { + if (cl[i]->GetExt("cm_protect_"+std::string(channel->name))) + { + WriteServ(user->fd,"388 %s %s %s",user->nick, channel->name,cl[i]->nick); + } + } + WriteServ(user->fd,"389 %s %s :End of channel protected user list",user->nick, channel->name); + } + + } virtual ~ModuleChanProtect() { -- cgit v1.2.3