X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fconfigreader.cpp;h=c492f693444826c0ba72b2940ee75ff95fd4ee5d;hb=0de0e25586bf6153e682a05e1abdb43bc4ee16e4;hp=42a3cd4dea20910c38a19b7d697e9b6e1658da8b;hpb=aa96718ad0c70a075f3bbb081b261afe3f2d7bc9;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/configreader.cpp b/src/configreader.cpp index 42a3cd4de..c492f6934 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -528,7 +528,7 @@ bool DoConnect(ServerConfig* conf, const char*, char**, ValueList &values, int*) ((*name && (cc->GetName() == name)) || // if the name is the same (*allow && (cc->GetHost() == allow)) || // or the allow is the same (*deny && (cc->GetHost() == deny))) && // or the deny is the same - (!port || port && (cc->GetPort() == port)) // and there is no port, or there is a port and the port is the same + (!port || (port && (cc->GetPort() == port))) // and there is no port, or there is a port and the port is the same ) { /* reenable class so users can be shoved into it :P */ @@ -1302,15 +1302,20 @@ void ServerConfig::Read(bool bail, User* user) } - /** Note: This is safe, the method checks for user == NULL */ - ServerInstance->Threads->Mutex(true); - ServerInstance->Parser->SetupCommandTable(user); - ServerInstance->Threads->Mutex(false); - - if (user) - user->WriteServ("NOTICE %s :*** Successfully rehashed server.", user->nick.c_str()); + if (bail) + { + /** Note: This is safe, the method checks for user == NULL */ + ServerInstance->Threads->Mutex(true); + ServerInstance->Parser->SetupCommandTable(user); + ServerInstance->Threads->Mutex(false); + } else - ServerInstance->SNO->WriteToSnoMask('A', "*** Successfully rehashed server."); + { + if (user) + user->WriteServ("NOTICE %s :*** Successfully rehashed server.", user->nick.c_str()); + else + ServerInstance->SNO->WriteToSnoMask('A', "*** Successfully rehashed server."); + } } @@ -2068,7 +2073,7 @@ bool ServerConfig::DirValid(const char* dirandfile) std::string ServerConfig::GetFullProgDir() { - char buffer[PATH_MAX+1]; + char buffer[PATH_MAX]; #ifdef WINDOWS /* Windows has specific api calls to get the exe path that never fail. * For once, windows has something of use, compared to the POSIX code