]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/helperfuncs.cpp
Smart trick: the 'build complete' message is now a makefile section of its own which...
[user/henk/code/inspircd.git] / src / helperfuncs.cpp
index 9bb843094919c71d2d295c141280e01b29d92c50..c09b714f17f708d3f0260436c0e7588757df4185 100644 (file)
@@ -196,9 +196,9 @@ void InspIRCd::WriteMode(const char* modes, int flags, const char* text, ...)
                                        break;
                                }
                        }
+                       if (send_to_user)
+                               t->WriteServ("NOTICE %s :%s",t->nick,textbuffer);
                }
-               if (send_to_user)
-                       t->WriteServ("NOTICE %s :%s",t->nick,textbuffer);
        }
        else
        if (flags == WM_OR)
@@ -216,9 +216,9 @@ void InspIRCd::WriteMode(const char* modes, int flags, const char* text, ...)
                                        break;
                                }
                        }
+                       if (send_to_user)
+                               t->WriteServ("NOTICE %s :%s",t->nick,textbuffer);
                }
-               if (send_to_user)
-                       t->WriteServ("NOTICE %s :%s",t->nick,textbuffer);
        }
 }
 
@@ -446,26 +446,17 @@ void InspIRCd::OpenLog(char** argv, int argc)
                {
                        Config->logpath = ServerConfig::GetFullProgDir(argv,argc) + "/ircd.log";
                }
+
+               Config->log_file = fopen(Config->logpath.c_str(),"a+");
        }
        else
        {
                Config->log_file = fopen(this->LogFileName,"a+");
-
-               if (!Config->log_file)
-               {
-                       printf("ERROR: Could not write to logfile %s, bailing!\n\n",Config->logpath.c_str());
-                       Exit(ERROR);
-               }
-
-               this->Logger = new FileLogger(this, Config->log_file);
-               return;
        }
 
-       Config->log_file = fopen(Config->logpath.c_str(),"a+");
-
        if (!Config->log_file)
        {
-               printf("ERROR: Could not write to logfile %s, bailing!\n\n",Config->logpath.c_str());
+               printf("ERROR: Could not write to logfile %s: %s\n\n", Config->logpath.c_str(), strerror(errno));
                Exit(ERROR);
        }