]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configreader.cpp
Replace some C-isms with C++-isms.
[user/henk/code/inspircd.git] / src / configreader.cpp
index dcf4b7162c237dc6df175f507c076f36bc0a6eb9..cd6122b25f36715d77f0f17fb7361fd475c78dc2 100644 (file)
@@ -335,13 +335,13 @@ struct DeprecatedConfig
 {
        /** Tag name. */
        std::string tag;
-       
+
        /** Attribute key. */
        std::string key;
-       
+
        /** Attribute value. */
        std::string value;
-       
+
        /** Reason for deprecation. */
        std::string reason;
 };
@@ -595,14 +595,14 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
                ServerInstance->BindPorts(pl);
                if (pl.size())
                {
-                       errstr << "Not all your client ports could be bound.\nThe following port(s) failed to bind:\n";
+                       errstr << "Not all your client ports could be bound." << std::endl
+                               << "The following port(s) failed to bind:" << std::endl;
 
                        int j = 1;
                        for (FailedPortList::iterator i = pl.begin(); i != pl.end(); i++, j++)
                        {
-                               char buf[MAXBUF];
-                               snprintf(buf, MAXBUF, "%d.   Address: %s   Reason: %s\n", j, i->first.empty() ? "<all>" : i->first.c_str(), i->second.c_str());
-                               errstr << buf;
+                               errstr << j << ".\tAddress: " << (i->first.empty() ? "<all>" : i->first.c_str()) << "\tReason: "
+                                       << i->second << std::endl;
                        }
                }
        }