X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_chancreate.cpp;h=345dc2d444ee4c65e9f664ac26dea7465c8eee1f;hb=e4acbc95b8b6cd5b28d38a2242c02e8ff4991e4a;hp=915e7c8cbad99106e6de3a8e5f61be392425a7b1;hpb=2b8ce39c6ea5e7a22fe39b21756f82051465f143;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_chancreate.cpp b/src/modules/m_chancreate.cpp index 915e7c8cb..345dc2d44 100644 --- a/src/modules/m_chancreate.cpp +++ b/src/modules/m_chancreate.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * InspIRCd: (C) 2002-2008 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -12,9 +12,6 @@ */ #include "inspircd.h" -#include "users.h" -#include "channels.h" -#include "modules.h" /* $ModDesc: Creates a snomask with notices whenever a new channel is created */ @@ -26,6 +23,8 @@ class ModuleChanCreate : public Module : Module(Me) { ServerInstance->SNO->EnableSnomask('j', "CHANCREATE"); + Implementation eventlist[] = { I_OnUserJoin }; + ServerInstance->Modules->Attach(eventlist, this, 1); } virtual ~ModuleChanCreate() @@ -38,12 +37,8 @@ class ModuleChanCreate : public Module return Version(1,1,0,0,VF_VENDOR,API_VERSION); } - void Implements(char* List) - { - List[I_OnUserJoin] = 1; - } - virtual void OnUserJoin(userrec* user, chanrec* channel, bool &silent) + virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent) { if (channel->GetUserCounter() == 1) {