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 * ---------------------------------------------------
16 /* $ModDesc: Provides support for seeing local and remote nickchanges via snomasks */
18 class ModuleSeeNicks : public Module
21 ModuleSeeNicks(InspIRCd* Me)
24 ServerInstance->SNO->EnableSnomask('n',"NICK");
25 ServerInstance->SNO->EnableSnomask('N',"REMOTENICK");
26 Implementation eventlist[] = { I_OnUserPostNick };
27 ServerInstance->Modules->Attach(eventlist, this, 1);
30 virtual ~ModuleSeeNicks()
32 ServerInstance->SNO->DisableSnomask('n');
33 ServerInstance->SNO->DisableSnomask('N');
36 virtual Version GetVersion()
38 return Version(1,2,0,1, VF_VENDOR, API_VERSION);
42 virtual void OnUserPostNick(User* user, const std::string &oldnick)
44 ServerInstance->SNO->WriteToSnoMask(IS_LOCAL(user) ? 'n' : 'N',"User %s changed their nickname to %s", oldnick.c_str(), user->nick);
48 MODULE_INIT(ModuleSeeNicks)