class ModuleOperjoin : public Module
{
- private:
std::string operChan;
std::vector<std::string> operChans;
bool override;
}
public:
- ModuleOperjoin()
+ void init()
{
OnRehash(NULL);
Implementation eventlist[] = { I_OnPostOper, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
tokenize(operChan,operChans);
}
- virtual ~ModuleOperjoin()
- {
- }
-
virtual Version GetVersion()
{
return Version("Forces opers to join the specified channel(s) on oper-up", VF_VENDOR);
if (ServerInstance->IsChannel(it->c_str(), ServerInstance->Config->Limits.ChanMax))
Channel::JoinUser(user, it->c_str(), override, "", false, ServerInstance->Time());
- std::string chanList = IS_OPER(user)->getConfig("autojoin");
+ std::string chanList = user->oper->getConfig("autojoin");
if (!chanList.empty())
{
std::vector<std::string> typechans;