- if (ServerInstance->IsChannel(chan.c_str(), ServerInstance->Config->Limits.ChanMax))
- Channel::JoinUser(user, chan.c_str(), false, "", false, ServerInstance->Time());
+ if (ServerInstance->IsChannel(chan, ServerInstance->Config->Limits.ChanMax))
+ Channel::JoinUser(localuser, chan);