* | 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
*/
#include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
/* $ModDesc: Only opers may create new channels if this module is loaded */
irc::string channel = txt.c_str();
allowchans[channel] = 1;
}
- DELETE(MyConf);
+ delete MyConf;
}
public:
{
ReadConfig();
+ Implementation eventlist[] = { I_OnUserPreJoin, I_OnRehash };
+ ServerInstance->Modules->Attach(eventlist, this, 2);
}
- virtual void OnRehash(userrec* user, const std::string ¶meter)
+ virtual void OnRehash(User* user, const std::string ¶meter)
{
ReadConfig();
}
- void Implements(char* List)
- {
- List[I_OnUserPreJoin] = List[I_OnRehash] = 1;
- }
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
{
irc::string x = cname;
// user is not an oper and its not in the allow list