- if (!JoinChan.empty())
- {
- std::vector<std::string> Joinchans;
- tokenize(JoinChan,Joinchans);
- for(std::vector<std::string>::iterator it = Joinchans.begin(); it != Joinchans.end(); it++)
- chanrec::JoinUser(ServerInstance, user, it->c_str(), false);
- }
-
+ for(std::vector<std::string>::iterator it = Joinchans.begin(); it != Joinchans.end(); it++)
+ if (ServerInstance->IsChannel(it->c_str()))
+ Channel::JoinUser(ServerInstance, user, it->c_str(), false, "", false, ServerInstance->Time());