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: 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 Implementation eventlist[] = { I_OnUserJoin };
27 ServerInstance->Modules->Attach(eventlist, this, 1);
30 virtual ~ModuleChanCreate()
32 ServerInstance->SNO->DisableSnomask('j');
35 virtual Version GetVersion()
37 return Version(1,1,0,0,VF_VENDOR,API_VERSION);
41 virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent)
43 if (channel->GetUserCounter() == 1)
45 ServerInstance->SNO->WriteToSnoMask('j', "Channel %s created by %s!%s@%s", channel->name, user->nick, user->ident, user->host);
50 MODULE_INIT(ModuleChanCreate)