summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-18 13:07:29 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-18 13:07:29 +0000
commit6ba4c5b9d334418c04c2ab6cc7af373dad434f9c (patch)
tree3316d6bd4fcd3c64f9f9e242d09c5e7da824800a /src
parenta647fe86cf4a08a719c472fd977c8d231fee9033 (diff)
Changed "is now running" message to AFTER port bind checks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1119 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/inspircd.cpp39
1 files changed, 20 insertions, 19 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index ad5e46905..a1e294696 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -3683,7 +3683,8 @@ int InspIRCd(void)
me[count3] = new serverrec(ServerName,100L,false);
if (!me[count3]->CreateListener(Addr,atoi(configToken)))
{
- log(DEFAULT,"Error! Failed to bind port %d",atoi(configToken));
+ log(DEFAULT,"Warning: Failed to bind port %d",atoi(configToken));
+ printf("Warning: Failed to bind port %d",atoi(configToken));
}
else
{
@@ -3702,8 +3703,7 @@ int InspIRCd(void)
UDPportCount = count3;
log(DEBUG,"InspIRCd: startup: read %d total client ports and %d total server ports",portCount,UDPportCount);
-
- log(DEBUG,"InspIRCd: startup: InspIRCd is now running!");
+ log(DEBUG,"InspIRCd: startup: InspIRCd is now starting!");
printf("\n");
@@ -3722,24 +3722,8 @@ int InspIRCd(void)
}
log(DEBUG,"Total loaded modules: %d",MODCOUNT+1);
- printf("\nInspIRCd is now running!\n");
-
startup_time = time(NULL);
- if (nofork)
- {
- log(VERBOSE,"Not forking as -nofork was specified");
- }
- else
- {
- if (DaemonSeed() == ERROR)
- {
- log(DEFAULT,"InspIRCd: startup: can't daemonise");
- printf("ERROR: could not go into daemon mode. Shutting down.\n");
- Exit(ERROR);
- }
- }
-
char PID[MAXBUF];
ConfValue("pid","file",0,PID,&config_f);
WritePID(PID);
@@ -3773,10 +3757,27 @@ int InspIRCd(void)
if (boundPortCount == 0)
{
log(DEFAULT,"InspIRCd: startup: no ports bound, bailing!");
+ printf("ERROR: Was not able to bind any of %d ports! Please check your configuration.\r\n", portCount);
return (ERROR);
}
+ printf("\nInspIRCd is now running!\n");
+
+ if (nofork)
+ {
+ log(VERBOSE,"Not forking as -nofork was specified");
+ }
+ else
+ {
+ if (DaemonSeed() == ERROR)
+ {
+ log(DEFAULT,"InspIRCd: startup: can't daemonise");
+ printf("ERROR: could not go into daemon mode. Shutting down.\n");
+ Exit(ERROR);
+ }
+ }
+
length = sizeof (client);
char udp_msg[MAXBUF], tcp_host[MAXBUF];