summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_ldapauth.cpp10
-rw-r--r--src/modules/extra/m_sqlauth.cpp6
-rw-r--r--src/modules/extra/m_sqloper.cpp2
-rw-r--r--src/modules/extra/m_ssl_oper_cert.cpp4
-rw-r--r--src/modules/m_cgiirc.cpp33
-rw-r--r--src/modules/m_chancreate.cpp4
-rw-r--r--src/modules/m_cloaking.cpp15
-rw-r--r--src/modules/m_customtitle.cpp4
-rw-r--r--src/modules/m_operlog.cpp8
-rw-r--r--src/modules/m_showwhois.cpp4
-rw-r--r--src/modules/m_spanningtree/netburst.cpp2
-rw-r--r--src/modules/m_spanningtree/opertype.cpp2
-rw-r--r--src/modules/m_spanningtree/override_stats.cpp2
-rw-r--r--src/modules/m_spanningtree/uid.cpp4
14 files changed, 41 insertions, 59 deletions
diff --git a/src/modules/extra/m_ldapauth.cpp b/src/modules/extra/m_ldapauth.cpp
index 74e59c62a..93ca34ff2 100644
--- a/src/modules/extra/m_ldapauth.cpp
+++ b/src/modules/extra/m_ldapauth.cpp
@@ -144,7 +144,7 @@ public:
{
free(authpass);
if (verbose)
- ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP bind failed: %s)", user->nick.c_str(), user->ident.c_str(), user->host, ldap_err2string(res));
+ ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP bind failed: %s)", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), ldap_err2string(res));
ldap_unbind_ext(conn, NULL, NULL);
conn = NULL;
return false;
@@ -156,20 +156,20 @@ public:
if ((res = ldap_search_ext_s(conn, base.c_str(), searchscope, what.c_str(), NULL, 0, NULL, NULL, NULL, 0, &msg)) != LDAP_SUCCESS)
{
if (verbose)
- ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP search failed: %s)", user->nick.c_str(), user->ident.c_str(), user->host, ldap_err2string(res));
+ ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP search failed: %s)", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), ldap_err2string(res));
return false;
}
if (ldap_count_entries(conn, msg) > 1)
{
if (verbose)
- ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP search returned more than one result: %s)", user->nick.c_str(), user->ident.c_str(), user->host, ldap_err2string(res));
+ ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP search returned more than one result: %s)", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), ldap_err2string(res));
ldap_msgfree(msg);
return false;
}
if ((entry = ldap_first_entry(conn, msg)) == NULL)
{
if (verbose)
- ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP search returned no results: %s)", user->nick.c_str(), user->ident.c_str(), user->host, ldap_err2string(res));
+ ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP search returned no results: %s)", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), ldap_err2string(res));
ldap_msgfree(msg);
return false;
}
@@ -184,7 +184,7 @@ public:
else
{
if (verbose)
- ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (%s)", user->nick.c_str(), user->ident.c_str(), user->host, ldap_err2string(res));
+ ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (%s)", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), ldap_err2string(res));
ldap_msgfree(msg);
user->Extend("ldapauth_failed");
return false;
diff --git a/src/modules/extra/m_sqlauth.cpp b/src/modules/extra/m_sqlauth.cpp
index 9ca4473b8..18859d133 100644
--- a/src/modules/extra/m_sqlauth.cpp
+++ b/src/modules/extra/m_sqlauth.cpp
@@ -149,7 +149,7 @@ public:
else
{
if (verbose)
- ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (SQL query failed: %s)", user->nick.c_str(), user->ident.c_str(), user->host, req.error.Str());
+ ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (SQL query failed: %s)", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), req.error.Str());
return false;
}
}
@@ -175,13 +175,13 @@ public:
else if (verbose)
{
/* No rows in result, this means there was no record matching the user */
- ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (SQL query returned no matches)", user->nick.c_str(), user->ident.c_str(), user->host);
+ ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (SQL query returned no matches)", user->nick.c_str(), user->ident.c_str(), user->host.c_str());
user->Extend("sqlauth_failed");
}
}
else if (verbose)
{
- ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (SQL query failed: %s)", user->nick.c_str(), user->ident.c_str(), user->host, res->error.Str());
+ ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (SQL query failed: %s)", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), res->error.Str());
user->Extend("sqlauth_failed");
}
}
diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp
index 7073e8004..f3c32b140 100644
--- a/src/modules/extra/m_sqloper.cpp
+++ b/src/modules/extra/m_sqloper.cpp
@@ -306,7 +306,7 @@ public:
if (operhost.size())
user->ChangeDisplayedHost(operhost.c_str());
- ServerInstance->SNO->WriteToSnoMask('o',"%s (%s@%s) is now an IRC operator of type %s", user->nick.c_str(), user->ident.c_str(), user->host, type.c_str());
+ ServerInstance->SNO->WriteToSnoMask('o',"%s (%s@%s) is now an IRC operator of type %s", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), type.c_str());
user->WriteNumeric(381, "%s :You are now %s %s",user->nick.c_str(), strchr("aeiouAEIOU", type[0]) ? "an" : "a", irc::Spacify(type.c_str()));
if (!user->modes[UM_OPERATOR])
diff --git a/src/modules/extra/m_ssl_oper_cert.cpp b/src/modules/extra/m_ssl_oper_cert.cpp
index 3bbaa359e..c99dfa2e2 100644
--- a/src/modules/extra/m_ssl_oper_cert.cpp
+++ b/src/modules/extra/m_ssl_oper_cert.cpp
@@ -129,7 +129,7 @@ class ModuleOperSSLCert : public Module
bool SSLOnly;
char* dummy;
- snprintf(TheHost,MAXBUF,"%s@%s",user->ident.c_str(),user->host);
+ snprintf(TheHost,MAXBUF,"%s@%s",user->ident.c_str(),user->host.c_str());
snprintf(TheIP, MAXBUF,"%s@%s",user->ident.c_str(),user->GetIPString());
HasCert = user->GetExt("ssl_cert",cert);
@@ -169,7 +169,7 @@ class ModuleOperSSLCert : public Module
{
user->WriteNumeric(491, "%s :This oper login name requires a matching key fingerprint.",user->nick.c_str());
ServerInstance->SNO->WriteToSnoMask('o',"'%s' cannot oper, does not match fingerprint", user->nick.c_str());
- ServerInstance->Logs->Log("m_ssl_oper_cert",DEFAULT,"OPER: Failed oper attempt by %s!%s@%s: credentials valid, but wrong fingerprint.",user->nick.c_str(), user->ident.c_str(), user->host);
+ ServerInstance->Logs->Log("m_ssl_oper_cert",DEFAULT,"OPER: Failed oper attempt by %s!%s@%s: credentials valid, but wrong fingerprint.", user->nick.c_str(), user->ident.c_str(), user->host.c_str());
return 1;
}
}
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp
index 691c54184..6c99d9d35 100644
--- a/src/modules/m_cgiirc.cpp
+++ b/src/modules/m_cgiirc.cpp
@@ -75,7 +75,7 @@ class CommandWebirc : public Command
user->Extend("cgiirc_realhost", new std::string(user->host));
user->Extend("cgiirc_realip", new std::string(user->GetIPString()));
if (notify)
- ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from %s", user->nick.c_str(), user->host, parameters[2].c_str(), user->host);
+ ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from %s", user->nick.c_str(), user->host.c_str(), parameters[2].c_str(), user->host.c_str());
user->Extend("cgiirc_webirc_hostname", new std::string(parameters[2]));
user->Extend("cgiirc_webirc_ip", new std::string(parameters[3]));
return CMD_LOCALONLY;
@@ -108,10 +108,10 @@ class CGIResolver : public Resolver
if ((them) && (them == ServerInstance->SE->GetRef(theirfd)))
{
if (notify)
- ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from %s", them->nick.c_str(), them->host, result.c_str(), typ.c_str());
+ ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from %s", them->nick.c_str(), them->host.c_str(), result.c_str(), typ.c_str());
- strlcpy(them->host, result.c_str(), 63);
- them->dhost.assign(result, 0, 63);
+ them->host.assign(result,0, 64);
+ them->dhost.assign(result, 0, 64);
them->ident.assign("~cgiirc", 0, 8);
them->InvalidateCache();
them->CheckLines();
@@ -123,7 +123,7 @@ class CGIResolver : public Resolver
if ((them) && (them == ServerInstance->SE->GetRef(theirfd)))
{
if (notify)
- ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), but their host can't be resolved from their %s!", them->nick.c_str(), them->host, typ.c_str());
+ ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), but their host can't be resolved from their %s!", them->nick.c_str(), them->host.c_str(), typ.c_str());
}
}
@@ -302,8 +302,8 @@ public:
std::string *webirc_hostname, *webirc_ip;
if(user->GetExt("cgiirc_webirc_hostname", webirc_hostname))
{
- strlcpy(user->host,webirc_hostname->c_str(),63);
- user->dhost.assign(*webirc_hostname, 0, 63);
+ user->host.assign(*webirc_hostname, 0, 64);
+ user->dhost.assign(*webirc_hostname, 0, 64);
delete webirc_hostname;
user->InvalidateCache();
user->Shrink("cgiirc_webirc_hostname");
@@ -338,7 +338,7 @@ public:
{
user->Extend("cgiirc_realhost", new std::string(user->host));
user->Extend("cgiirc_realip", new std::string(user->GetIPString()));
- strlcpy(user->host, user->password.c_str(), 64);
+ user->host.assign(user->password, 0, 64);
user->dhost.assign(user->password, 0, 64);
user->InvalidateCache();
@@ -361,7 +361,7 @@ public:
{
/* We were given a IP in the password, we don't do DNS so they get this is as their host as well. */
if(NotifyOpers)
- ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from PASS", user->nick.c_str(), user->host, user->password.c_str());
+ ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from PASS", user->nick.c_str(), user->host.c_str(), user->password.c_str());
}
else
{
@@ -376,15 +376,11 @@ public:
catch (...)
{
if (NotifyOpers)
- ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), but I could not resolve their hostname!", user->nick.c_str(), user->host);
+ ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), but I could not resolve their hostname!", user->nick.c_str(), user->host.c_str());
}
}
user->password.clear();
-
- /*if(NotifyOpers)
- ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from PASS", user->nick, user->host, user->password);*/
-
return true;
}
@@ -425,7 +421,7 @@ public:
user->CheckClass();
try
{
- strlcpy(user->host, newip, 16);
+ user->host.assign(newip, 0, 16);
user->dhost.assign(newip, 0, 16);
user->ident.assign("~cgiirc", 0, 8);
@@ -435,17 +431,14 @@ public:
}
catch (...)
{
- strlcpy(user->host, newip, 16);
+ user->host.assign(newip, 0, 16);
user->dhost.assign(newip, 0, 16);
user->ident.assign("~cgiirc", 0, 8);
user->InvalidateCache();
if(NotifyOpers)
- ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), but I could not resolve their hostname!", user->nick.c_str(), user->host);
+ ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), but I could not resolve their hostname!", user->nick.c_str(), user->host.c_str());
}
- /*strlcpy(user->host, newip, 16);
- strlcpy(user->dhost, newip, 16);
- strlcpy(user->ident, "~cgiirc", 8);*/
return true;
}
diff --git a/src/modules/m_chancreate.cpp b/src/modules/m_chancreate.cpp
index d1e17497c..3ce63567e 100644
--- a/src/modules/m_chancreate.cpp
+++ b/src/modules/m_chancreate.cpp
@@ -41,9 +41,7 @@ class ModuleChanCreate : public Module
virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent)
{
if (channel->GetUserCounter() == 1)
- {
- ServerInstance->SNO->WriteToSnoMask('j', "Channel %s created by %s!%s@%s", channel->name, user->nick.c_str(), user->ident.c_str(), user->host);
- }
+ ServerInstance->SNO->WriteToSnoMask('j', "Channel %s created by %s!%s@%s", channel->name, user->nick.c_str(), user->ident.c_str(), user->host.c_str());
}
};
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp
index b5b677172..2cbd8fb99 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -117,7 +117,7 @@ class CloakUser : public ModeHandler
/* User is removing the mode, so just restore their real host
* and make it match the displayed one.
*/
- dest->ChangeDisplayedHost(dest->host);
+ dest->ChangeDisplayedHost(dest->host.c_str());
dest->SetMode('x',false);
return MODEACTION_ALLOW;
}
@@ -361,10 +361,7 @@ class ModuleCloaking : public Module
virtual void OnUserConnect(User* dest)
{
- char* n1 = strchr(dest->host,'.');
- char* n2 = strchr(dest->host,':');
-
- if (n1 || n2)
+ if (dest->host.find('.') != std::string::npos || dest->host.find(':') != std::string::npos)
{
unsigned int iv[] = { cu->key1, cu->key2, cu->key3, cu->key4 };
std::string a = cu->LastTwoDomainParts(dest->host);
@@ -384,10 +381,10 @@ class ModuleCloaking : public Module
/** Reset the Hash module, and send it our IV and hex table */
HashResetRequest(this, cu->HashProvider).Send();
HashKeyRequest(this, cu->HashProvider, iv).Send();
- HashHexRequest(this, cu->HashProvider, cu->xtab[(*dest->host) % 4]);
+ HashHexRequest(this, cu->HashProvider, cu->xtab[(dest->host[0]) % 4]);
/* Generate a cloak using specialized Hash */
- std::string hostcloak = cu->prefix + "-" + std::string(HashSumRequest(this, cu->HashProvider, dest->host).Send()).substr(0,8) + a;
+ std::string hostcloak = cu->prefix + "-" + std::string(HashSumRequest(this, cu->HashProvider, dest->host.c_str()).Send()).substr(0,8) + a;
/* Fix by brain - if the cloaked host is > the max length of a host (64 bytes
* according to the DNS RFC) then tough titty, they get cloaked as an IP.
@@ -408,12 +405,12 @@ class ModuleCloaking : public Module
b = ((!strchr(dest->host,':')) ? cu->Cloak4(dest->host) : cu->Cloak6(dest->host));
#else
in_addr testaddr;
- if ((inet_aton(dest->host,&testaddr) < 1) && (hostcloak.length() <= 64))
+ if ((inet_aton(dest->host.c_str(),&testaddr) < 1) && (hostcloak.length() <= 64))
/* Invalid ipv4 address, and ipv4 user (resolved host) */
b = hostcloak;
else
/* Valid ipv4 address (not resolved) ipv4 user */
- b = cu->Cloak4(dest->host);
+ b = cu->Cloak4(dest->host.c_str());
#endif
}
else
diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp
index 07055f40a..b7e67b507 100644
--- a/src/modules/m_customtitle.cpp
+++ b/src/modules/m_customtitle.cpp
@@ -51,7 +51,7 @@ bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
char TheHost[MAXBUF];
char TheIP[MAXBUF];
- snprintf(TheHost,MAXBUF,"%s@%s",user->ident.c_str(), user->host);
+ snprintf(TheHost,MAXBUF,"%s@%s",user->ident.c_str(), user->host.c_str());
snprintf(TheIP, MAXBUF,"%s@%s",user->ident.c_str(), user->GetIPString());
ConfigReader Conf(ServerInstance);
@@ -95,7 +95,7 @@ bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
if (!ServerInstance->ULine(user->server))
// Ulines also fail TITLEs silently
- ServerInstance->SNO->WriteToSnoMask('A', "Failed TITLE attempt by %s!%s@%s using login '%s'",user->nick.c_str(),user->ident.c_str(),user->host,parameters[0].c_str());
+ ServerInstance->SNO->WriteToSnoMask('A', "Failed TITLE attempt by %s!%s@%s using login '%s'", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), parameters[0].c_str());
user->WriteServ("NOTICE %s :Invalid title credentials",user->nick.c_str());
return CMD_SUCCESS;
diff --git a/src/modules/m_operlog.cpp b/src/modules/m_operlog.cpp
index 2aef64d7a..e295d2183 100644
--- a/src/modules/m_operlog.cpp
+++ b/src/modules/m_operlog.cpp
@@ -47,13 +47,7 @@ class ModuleOperLog : public Module
{
Command* thiscommand = ServerInstance->Parser->GetHandler(command);
if ((thiscommand) && (thiscommand->flags_needed == 'o'))
- {
- std::string plist;
- for (int j = 0; j < (int)parameters.size(); j++)
- plist.append(std::string(" ")+parameters[j]);
-
- ServerInstance->Logs->Log("m_operlog",DEFAULT,"OPERLOG: [%s!%s@%s] %s%s",user->nick.c_str(), user->ident.c_str(), user->host, command.c_str(), plist.c_str());
- }
+ ServerInstance->Logs->Log("m_operlog",DEFAULT,"OPERLOG: [%s!%s@%s] %s %s",user->nick.c_str(), user->ident.c_str(), user->host.c_str(), command.c_str(), irc::stringjoiner(" ", parameters, 0, parameters.size() - 1).GetJoined().c_str());
}
return 0;
diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp
index c39649896..a66ea2f98 100644
--- a/src/modules/m_showwhois.cpp
+++ b/src/modules/m_showwhois.cpp
@@ -84,11 +84,11 @@ class ModuleShowwhois : public Module
{
if (IS_LOCAL(dest))
{
- dest->WriteServ("NOTICE %s :*** %s (%s@%s) did a /whois on you.",dest->nick.c_str(),source->nick.c_str(),source->ident.c_str(),source->host);
+ dest->WriteServ("NOTICE %s :*** %s (%s@%s) did a /whois on you.", dest->nick.c_str(), source->nick.c_str(), source->ident.c_str(), source->host.c_str());
}
else
{
- std::string msg = std::string(":") + dest->server + " NOTICE " + dest->nick + " :*** " + source->nick + " (" + source->ident + "@" + source->host + ") did a /whois on you.";
+ std::string msg = std::string(":") + dest->server + " NOTICE " + dest->nick + " :*** " + source->nick + " (" + source->ident + "@" + source->host.c_str() + ") did a /whois on you.";
ServerInstance->PI->PushToClient(dest, msg);
}
}
diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp
index b1f63c01b..3a28ca8a9 100644
--- a/src/modules/m_spanningtree/netburst.cpp
+++ b/src/modules/m_spanningtree/netburst.cpp
@@ -222,7 +222,7 @@ void TreeSocket::SendUsers(TreeServer* Current)
if (theirserver)
{
snprintf(data,MAXBUF,":%s UID %s %lu %s %s %s %s +%s %s %lu :%s", theirserver->GetID().c_str(), u->second->uuid.c_str(),
- (unsigned long)u->second->age, u->second->nick.c_str(), u->second->host, u->second->dhost.c_str(),
+ (unsigned long)u->second->age, u->second->nick.c_str(), u->second->host.c_str(), u->second->dhost.c_str(),
u->second->ident.c_str(), u->second->FormatModes(), u->second->GetIPString(),
(unsigned long)u->second->signon, u->second->fullname.c_str());
this->WriteLine(data);
diff --git a/src/modules/m_spanningtree/opertype.cpp b/src/modules/m_spanningtree/opertype.cpp
index a5bd07416..a2aff74f9 100644
--- a/src/modules/m_spanningtree/opertype.cpp
+++ b/src/modules/m_spanningtree/opertype.cpp
@@ -57,7 +57,7 @@ bool TreeSocket::OperType(const std::string &prefix, std::deque<std::string> &pa
}
if (dosend)
- this->Instance->SNO->WriteToSnoMask('o',"From %s: User %s (%s@%s) is now an IRC operator of type %s",u->server, u->nick.c_str(),u->ident.c_str(),u->host,irc::Spacify(opertype.c_str()));
+ this->Instance->SNO->WriteToSnoMask('o',"From %s: User %s (%s@%s) is now an IRC operator of type %s",u->server, u->nick.c_str(),u->ident.c_str(), u->host.c_str(), irc::Spacify(opertype.c_str()));
}
return true;
}
diff --git a/src/modules/m_spanningtree/override_stats.cpp b/src/modules/m_spanningtree/override_stats.cpp
index 740694643..ab50f7656 100644
--- a/src/modules/m_spanningtree/override_stats.cpp
+++ b/src/modules/m_spanningtree/override_stats.cpp
@@ -72,7 +72,7 @@ int ModuleSpanningTree::OnStats(char statschar, User* user, string_list &results
results.push_back(std::string(ServerInstance->Config->ServerName)+" 244 "+user->nick+" H * * "+Utils->LinkBlocks[i].Name.c_str());
}
results.push_back(std::string(ServerInstance->Config->ServerName)+" 219 "+user->nick+" "+statschar+" :End of /STATS report");
- ServerInstance->SNO->WriteToSnoMask('t',"%s '%c' requested by %s (%s@%s)",(!strcmp(user->server,ServerInstance->Config->ServerName) ? "Stats" : "Remote stats"),statschar,user->nick.c_str(),user->ident.c_str(),user->host);
+ ServerInstance->SNO->WriteToSnoMask('t',"%s '%c' requested by %s (%s@%s)", (!strcmp(user->server,ServerInstance->Config->ServerName) ? "Stats" : "Remote stats"), statschar, user->nick.c_str(), user->ident.c_str(), user->host.c_str());
return 1;
}
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp
index f68da8a1c..e539e0b18 100644
--- a/src/modules/m_spanningtree/uid.cpp
+++ b/src/modules/m_spanningtree/uid.cpp
@@ -112,7 +112,7 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
(*(this->Instance->Users->clientlist))[tempnick] = _new;
_new->SetFd(FD_MAGIC_NUMBER);
_new->nick.assign(tempnick, NICKMAX - 1);
- strlcpy(_new->host, params[3].c_str(),64);
+ _new->host.assign(params[3], 0, 64);
_new->dhost.assign(params[4], 0, 64);
_new->server = this->Instance->FindServerNamePtr(remoteserver->GetName().c_str());
_new->ident.assign(params[5], 0, IDENTMAX + 1);
@@ -157,7 +157,7 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
dosend = false;
if (dosend)
- this->Instance->SNO->WriteToSnoMask('C',"Client connecting at %s: %s!%s@%s [%s] [%s]",_new->server,_new->nick.c_str(),_new->ident.c_str(),_new->host, _new->GetIPString(), _new->fullname.c_str());
+ this->Instance->SNO->WriteToSnoMask('C',"Client connecting at %s: %s!%s@%s [%s] [%s]", _new->server, _new->nick.c_str(), _new->ident.c_str(), _new->host.c_str(), _new->GetIPString(), _new->fullname.c_str());
params[9] = ":" + params[9];
Utils->DoOneToAllButSender(source, "UID", params, source);