X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusermanager.cpp;h=2eebb1ed029f2c5035055d520b4df43aa467091c;hb=37fd031da06761c8a050105b55d73a8ab499fb74;hp=b355bc890ce32e2ff10f1f00a029d5421310e487;hpb=ee913368d7162dbe0dd119091f8b468eb7be0f1a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/usermanager.cpp b/src/usermanager.cpp index b355bc890..2eebb1ed0 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -63,7 +63,7 @@ void UserManager::AddUser(int socket, ClientListenSocket* via, irc::sockets::soc /* 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; @@ -117,8 +117,8 @@ void UserManager::AddUser(int socket, ClientListenSocket* via, irc::sockets::soc { /* 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; } @@ -195,7 +195,6 @@ void UserManager::QuitUser(User *user, const std::string &quitreason, const char if (user->registered == REG_ALL) { FOREACH_MOD(I_OnUserQuit,OnUserQuit(user, reason, oper_reason)); - user->PurgeEmptyChannels(); user->WriteCommonQuit(reason, oper_reason); } @@ -245,7 +244,7 @@ void UserManager::QuitUser(User *user, const std::string &quitreason, const char 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(); @@ -422,7 +421,7 @@ void UserManager::ServerNoticeAll(const char* text, ...) 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::const_iterator i = local_users.begin(); i != local_users.end(); i++) { @@ -443,7 +442,7 @@ void UserManager::ServerPrivmsgAll(const char* text, ...) 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::const_iterator i = local_users.begin(); i != local_users.end(); i++) {