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: Creates a snomask with notices whenever a new channel is created */
18 class ModuleChanCreate : public Module
22 ModuleChanCreate(InspIRCd* Me)
25 ServerInstance->SNO->EnableSnomask('j', "CHANCREATE");
26 ServerInstance->SNO->EnableSnomask('J', "REMOTECHANCREATE");
27 Implementation eventlist[] = { I_OnUserJoin };
28 ServerInstance->Modules->Attach(eventlist, this, 1);
33 ServerInstance->SNO->DisableSnomask('j');
34 ServerInstance->SNO->DisableSnomask('J');
39 return Version("$Id$",VF_VENDOR,API_VERSION);
43 void OnUserJoin(Membership* memb, bool sync, bool created, CUList& except)
47 ServerInstance->SNO->WriteToSnoMask(IS_LOCAL(memb->user) ? 'j' : 'J', "Channel %s created by %s!%s@%s",
48 memb->chan->name.c_str(), memb->user->nick.c_str(), memb->user->ident.c_str(), memb->user->host.c_str());
53 MODULE_INIT(ModuleChanCreate)