/* The users default nick is their UUID */
New->nick.assign(New->uuid, 0, ServerInstance->Config->Limits.NickMax);
- New->server = ServerInstance->FindServerNamePtr(ServerInstance->Config->ServerName);
+ New->server = ServerInstance->Config->ServerName;
New->ident.assign("unknown");
New->registered = REG_NONE;
{
/* user banned */
ServerInstance->Logs->Log("BANCACHE", DEBUG, std::string("BanCache: Positive hit for ") + New->GetIPString());
- if (*ServerInstance->Config->MoronBanner)
- New->WriteServ("NOTICE %s :*** %s", New->nick.c_str(), ServerInstance->Config->MoronBanner);
+ if (!ServerInstance->Config->MoronBanner.empty())
+ New->WriteServ("NOTICE %s :*** %s", New->nick.c_str(), ServerInstance->Config->MoronBanner.c_str());
this->QuitUser(New, b->Reason);
return;
}
return;
}
- if (IS_FAKE(user))
+ if (IS_SERVER(user))
{
ServerInstance->Logs->Log("CULLLIST",DEBUG, "*** Warning *** - You tried to quit a fake user (%s)", user->nick.c_str());
return;
if (user->registered == REG_ALL)
{
FOREACH_MOD(I_OnUserQuit,OnUserQuit(user, reason, oper_reason));
- user->PurgeEmptyChannels();
user->WriteCommonQuit(reason, oper_reason);
}
if ((!ServerInstance->SilentULine(user->server)) && (!user->quietquit))
{
ServerInstance->SNO->WriteToSnoMask('Q',"Client exiting on server %s: %s!%s@%s [%s]",
- user->server, user->nick.c_str(), user->ident.c_str(), user->host.c_str(), oper_reason.c_str());
+ user->server.c_str(), user->nick.c_str(), user->ident.c_str(), user->host.c_str(), oper_reason.c_str());
}
}
user->AddToWhoWas();
vsnprintf(textbuffer, MAXBUF, text, argsPtr);
va_end(argsPtr);
- snprintf(formatbuffer,MAXBUF,"NOTICE $%s :%s", ServerInstance->Config->ServerName, textbuffer);
+ snprintf(formatbuffer,MAXBUF,"NOTICE $%s :%s", ServerInstance->Config->ServerName.c_str(), textbuffer);
for (std::vector<User*>::const_iterator i = local_users.begin(); i != local_users.end(); i++)
{
vsnprintf(textbuffer, MAXBUF, text, argsPtr);
va_end(argsPtr);
- snprintf(formatbuffer,MAXBUF,"PRIVMSG $%s :%s", ServerInstance->Config->ServerName, textbuffer);
+ snprintf(formatbuffer,MAXBUF,"PRIVMSG $%s :%s", ServerInstance->Config->ServerName.c_str(), textbuffer);
for (std::vector<User*>::const_iterator i = local_users.begin(); i != local_users.end(); i++)
{