if (!user || !cn || user->registered != REG_ALL)
return NULL;
- char cname[MAXBUF];
std::string privs;
Channel *Ptr;
}
}
- strlcpy(cname, cn, ServerInstance->Config->Limits.ChanMax);
+ std::string cname;
+ cname.assign(std::string(cn), 0, ServerInstance->Config->Limits.ChanMax);
Ptr = ServerInstance->FindChan(cname);
bool created_by_local = false;
if (IS_LOCAL(user) && override == false)
{
ModResult MOD_RESULT;
- FIRST_MOD_RESULT(OnUserPreJoin, MOD_RESULT, (user, NULL, cname, privs, key ? key : ""));
+ FIRST_MOD_RESULT(OnUserPreJoin, MOD_RESULT, (user, NULL, cname.c_str(), privs, key ? key : ""));
if (MOD_RESULT == MOD_RES_DENY)
return NULL;
}
if (IS_LOCAL(user) && override == false)
{
ModResult MOD_RESULT;
- FIRST_MOD_RESULT(OnUserPreJoin, MOD_RESULT, (user, Ptr, cname, privs, key ? key : ""));
+ FIRST_MOD_RESULT(OnUserPreJoin, MOD_RESULT, (user, Ptr, cname.c_str(), privs, key ? key : ""));
if (MOD_RESULT == MOD_RES_DENY)
{
return NULL;
int count = 0;
for (UserMembIter i = userlist.begin(); i != userlist.end(); i++)
{
- if (!(i->first->IsModeSet('i')))
+ if (!i->first->quitting && !i->first->IsModeSet('i'))
count++;
}
for (UserMembIter i = userlist.begin(); i != userlist.end(); i++)
{
+ if (i->first->quitting)
+ continue;
if ((!has_user) && (i->first->IsModeSet('i')))
{
/*