]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
When rehashing and adding new ports, error back to the user if the ports fail to...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 12 Nov 2006 23:14:56 +0000 (23:14 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 12 Nov 2006 23:14:56 +0000 (23:14 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5730 e03df62e-2008-0410-955e-edbf42e46eb7

src/configreader.cpp

index b0f2d68722bc5ccfecd466f20d55b86c84b15b3c..1b38e715533613bc530e8826b1b52345e35d2f71 100644 (file)
@@ -771,10 +771,21 @@ void ServerConfig::Read(bool bail, userrec* user)
         */
        if (!bail)
        {
-               int found_ports;
+               int found_ports = 0;
                FailedPortList pl;
                ServerInstance->stats->BoundPortCount = ServerInstance->BindPorts(false, found_ports, pl);
 
+               if (pl.size())
+               {
+                       user->WriteServ("NOTICE %s :*** Not all your client ports could be bound.", user->nick);
+                       user->WriteServ("NOTICE %s :*** The following port%s failed to bind:", user->nick, found_ports - ServerInstance->stats->BoundPortCount != 1 ? "s" : "");
+                       int j = 1;
+                       for (FailedPortList::iterator i = pl.begin(); i != pl.end(); i++, j++)
+                       {
+                               user->WriteServ("NOTICE %s :*** %d.   IP: %s     Port: %lu", user->nick, j, i->first.empty() ? "<all>" : i->first.c_str(), (unsigned long)i->second);
+                       }
+               }
+
                if (!removed_modules.empty())
                        for (std::vector<std::string>::iterator removing = removed_modules.begin(); removing != removed_modules.end(); removing++)
                        {