1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2009 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/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
22 ServerInstance->Modules->Attach(I_OnUserList, this);
25 virtual ModResult OnUserList(User* user, Channel* Ptr)
27 /* User has priv and is NOT on the channel */
28 if (user->HasPrivPermission("channels/auspex") && !Ptr->HasUser(user))
31 return MOD_RES_PASSTHRU;
36 /* To ensure that we get priority over namesx and delayjoin for names list generation */
37 Module* list[] = { ServerInstance->Modules->Find("m_namesx.so"), ServerInstance->Modules->Find("m_delayjoin.so") };
38 ServerInstance->Modules->SetPriority(this, I_OnUserList, PRIORITY_BEFORE, list, 2);
45 virtual Version GetVersion()
47 return Version("Provides the ability to see the complete names list of channels an oper is not a member of", VF_VENDOR, API_VERSION);
51 MODULE_INIT(ModuleSpy)