-class ModuleOperjoinFactory : public ModuleFactory
-{
- public:
- ModuleOperjoinFactory()
- {
- }
-
- ~ModuleOperjoinFactory()
- {
- }
-
- virtual Module * CreateModule(InspIRCd* Me)
- {
- return new ModuleOperjoin(Me);
+ std::string chanList = localuser->oper->getConfig("autojoin");
+ if (!chanList.empty())
+ {
+ std::vector<std::string> typechans;
+ tokenize(chanList, typechans);
+ for (std::vector<std::string>::const_iterator it = typechans.begin(); it != typechans.end(); ++it)
+ {
+ if (ServerInstance->IsChannel(*it, ServerInstance->Config->Limits.ChanMax))
+ {
+ Channel::JoinUser(localuser, *it, override);
+ }
+ }
+ }