summaryrefslogtreecommitdiff
path: root/src/usermanager.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-03 01:52:59 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-03 01:52:59 +0000
commitde25d946733f774e3a5b53a58438a9c92af0acbe (patch)
tree459ccc3b0c2423f1592afec4b458615968a1176d /src/usermanager.cpp
parente57ed15735a3f23d6451845c7cf96758e6909d8c (diff)
Get rid of a bunch of memory-wasting C-style strings
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11796 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/usermanager.cpp')
-rw-r--r--src/usermanager.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index e4bc3254e..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;
}
@@ -421,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<User*>::const_iterator i = local_users.begin(); i != local_users.end(); i++)
{
@@ -442,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<User*>::const_iterator i = local_users.begin(); i != local_users.end(); i++)
{