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
21 ModuleSpy(InspIRCd* Me) : Module(Me)
23 ServerInstance->Modules->Attach(I_OnUserList, this);
26 virtual ModResult OnUserList(User* user, Channel* Ptr)
28 /* User has priv and is NOT on the channel */
29 if (user->HasPrivPermission("channels/auspex") && !Ptr->HasUser(user))
32 return MOD_RES_PASSTHRU;
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, PRIORITY_BEFORE, list, 2);
46 virtual Version GetVersion()
48 return Version("$Id$", VF_VENDOR, API_VERSION);
52 MODULE_INIT(ModuleSpy)