1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2007 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 */
19 class ModuleSpy : public Module
22 ModuleSpy(InspIRCd* Me) : Module(Me)
24 ServerInstance->Modules->Attach(I_OnUserList, this);
27 virtual int OnUserList(User* user, Channel* Ptr, CUList* &nameslist)
29 /* User is an oper and is NOT on the channel */
30 if (IS_OPER(user) && !Ptr->HasUser(user))
38 /* To ensure that we get priority over namesx and delayjoin for names list generation */
39 Module* list[] = { ServerInstance->Modules->Find("m_namesx.so"), ServerInstance->Modules->Find("m_delayjoin.so") };
40 ServerInstance->Modules->SetPriority(this, I_OnUserList, PRIO_BEFORE, list, 2);
47 virtual Version GetVersion()
49 return Version(1, 1, 0, 0, VF_VENDOR, API_VERSION);
53 MODULE_INIT(ModuleSpy)