1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2008 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
14 /* $ModDesc: Provides the ability to see the complete names list of channels an oper is not a member of */
18 class ModuleSpy : public Module
21 ModuleSpy(InspIRCd* Me) : Module(Me)
23 ServerInstance->Modules->Attach(I_OnUserList, this);
26 virtual int OnUserList(User* user, Channel* Ptr, CUList* &nameslist)
28 /* User is an oper and is NOT on the channel */
29 if (IS_OPER(user) && !Ptr->HasUser(user))
37 /* To ensure that we get priority over namesx and delayjoin for names list generation */
38 Module* list[] = { ServerInstance->Modules->Find("m_namesx.so"), ServerInstance->Modules->Find("m_delayjoin.so") };
39 ServerInstance->Modules->SetPriority(this, I_OnUserList, PRIO_BEFORE, list, 2);
46 virtual Version GetVersion()
48 return Version(1, 2, 0, 0, VF_VENDOR, API_VERSION);
52 MODULE_INIT(ModuleSpy)