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 * ---------------------------------------------------
16 /* $ModDesc: Provides support for seeing local and remote nickchanges via snomasks */
18 class ModuleSeeNicks : public Module
23 ServerInstance->SNO->EnableSnomask('n',"NICK");
24 ServerInstance->SNO->EnableSnomask('N',"REMOTENICK");
25 Implementation eventlist[] = { I_OnUserPostNick };
26 ServerInstance->Modules->Attach(eventlist, this, 1);
29 virtual ~ModuleSeeNicks()
31 ServerInstance->SNO->DisableSnomask('n');
32 ServerInstance->SNO->DisableSnomask('N');
35 virtual Version GetVersion()
37 return Version("Provides support for seeing local and remote nickchanges via snomasks", VF_VENDOR);
41 virtual void OnUserPostNick(User* user, const std::string &oldnick)
43 ServerInstance->SNO->WriteToSnoMask(IS_LOCAL(user) ? 'n' : 'N',"User %s changed their nickname to %s", oldnick.c_str(), user->nick.c_str());
47 MODULE_INIT(ModuleSeeNicks)