]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix spacing in calls to LogManager::Log.
authorPeter Powell <petpow@saberuk.com>
Sun, 19 May 2013 02:29:49 +0000 (03:29 +0100)
committerPeter Powell <petpow@saberuk.com>
Sun, 19 May 2013 18:33:36 +0000 (19:33 +0100)
56 files changed:
include/modules.h
src/base.cpp
src/commands/cmd_die.cpp
src/commands/cmd_dns.cpp
src/commands/cmd_hostname_lookup.cpp
src/commands/cmd_kill.cpp
src/commands/cmd_oper.cpp
src/commands/cmd_restart.cpp
src/commands/cmd_whowas.cpp
src/configparser.cpp
src/configreader.cpp
src/cull_list.cpp
src/helperfuncs.cpp
src/inspircd.cpp
src/inspsocket.cpp
src/listensocket.cpp
src/modmanager_dynamic.cpp
src/modmanager_static.cpp
src/modules.cpp
src/modules/extra/m_mssql.cpp
src/modules/extra/m_pgsql.cpp
src/modules/extra/m_sqlite3.cpp
src/modules/extra/m_ssl_gnutls.cpp
src/modules/extra/m_ssl_openssl.cpp
src/modules/m_blockcaps.cpp
src/modules/m_cgiirc.cpp
src/modules/m_connectban.cpp
src/modules/m_filter.cpp
src/modules/m_httpd.cpp
src/modules/m_httpd_acl.cpp
src/modules/m_httpd_config.cpp
src/modules/m_httpd_stats.cpp
src/modules/m_ident.cpp
src/modules/m_nationalchars.cpp
src/modules/m_permchannels.cpp
src/modules/m_sasl.cpp
src/modules/m_spanningtree/fjoin.cpp
src/modules/m_spanningtree/fmode.cpp
src/modules/m_spanningtree/hmac.cpp
src/modules/m_spanningtree/override_map.cpp
src/modules/m_spanningtree/postcommand.cpp
src/modules/m_spanningtree/resolvers.cpp
src/modules/m_spanningtree/treeserver.cpp
src/modules/m_spanningtree/treesocket1.cpp
src/modules/m_spanningtree/treesocket2.cpp
src/modules/m_spanningtree/uid.cpp
src/modules/m_spanningtree/utils.cpp
src/modules/m_sqloper.cpp
src/modules/m_xline_db.cpp
src/socket.cpp
src/socketengines/socketengine_epoll.cpp
src/socketengines/socketengine_kqueue.cpp
src/socketengines/socketengine_poll.cpp
src/socketengines/socketengine_ports.cpp
src/socketengines/socketengine_select.cpp
src/usermanager.cpp

index 72ee2683d29a56b882a50e578afea40f95db0720..2306a7a03179b46ecf1e89cb9613b025b3f39fbd 100644 (file)
@@ -133,7 +133,7 @@ struct ModResult {
                } \
                catch (CoreException& modexcept) \
                { \
-                       ServerInstance->Logs->Log("MODULE",LOG_DEFAULT,"Exception caught: %s",modexcept.GetReason()); \
+                       ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "Exception caught: %s",modexcept.GetReason()); \
                } \
                _i = safei; \
        } \
@@ -160,7 +160,7 @@ do { \
                } \
                catch (CoreException& except_ ## n) \
                { \
-                       ServerInstance->Logs->Log("MODULE",LOG_DEFAULT,"Exception caught: %s", (except_ ## n).GetReason()); \
+                       ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "Exception caught: %s", (except_ ## n).GetReason()); \
                        (void) mod_ ## n; /* catch mismatched pairs */ \
                } \
        } \
index a4c3e887e39bb13edde8d7a7a2b655e05f3bd94f..db8d9f3cfe3dfd836314d41a6f1ca7677fc9090b 100644 (file)
@@ -198,8 +198,7 @@ CullResult Extensible::cull()
 Extensible::~Extensible()
 {
        if (!extensions.empty() && ServerInstance && ServerInstance->Logs)
-               ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG,
-                       "Extensible destructor called without cull @%p", (void*)this);
+               ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "Extensible destructor called without cull @%p", (void*)this);
 }
 
 LocalExtItem::LocalExtItem(const std::string& Key, Module* mod) : ExtensionItem(Key, mod)
index 06bfa5da5dad1ad890861dd75778c324af5b0884..3ccc037b46a0144704f6f7f0c0a843046909242e 100644 (file)
@@ -50,7 +50,7 @@ CmdResult CommandDie::Handle (const std::vector<std::string>& parameters, User *
        {
                {
                        std::string diebuf = "*** DIE command from " + user->GetFullHost() + ". Terminating.";
-                       ServerInstance->Logs->Log("COMMAND",LOG_SPARSE, diebuf);
+                       ServerInstance->Logs->Log("COMMAND", LOG_SPARSE, diebuf);
                        ServerInstance->SendError(diebuf);
                }
 
@@ -58,7 +58,7 @@ CmdResult CommandDie::Handle (const std::vector<std::string>& parameters, User *
        }
        else
        {
-               ServerInstance->Logs->Log("COMMAND",LOG_SPARSE, "Failed /DIE command from %s", user->GetFullRealHost().c_str());
+               ServerInstance->Logs->Log("COMMAND", LOG_SPARSE, "Failed /DIE command from %s", user->GetFullRealHost().c_str());
                ServerInstance->SNO->WriteGlobalSno('a', "Failed DIE Command from %s.", user->GetFullRealHost().c_str());
                return CMD_FAILURE;
        }
index 29467a88b56fb7c48a8cd348c94742fe3f01a92a..d10f0f982a6aac898d4279bebda88aaf3d4ff407 100644 (file)
@@ -736,7 +736,7 @@ class ModuleDNS : public Module
        {
 #ifdef _WIN32
                // attempt to look up their nameserver from the system
-               ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT,"WARNING: <dns:server> not defined, attempting to find a working server in the system settings...");
+               ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "WARNING: <dns:server> not defined, attempting to find a working server in the system settings...");
 
                PFIXED_INFO pFixedInfo;
                DWORD dwBufferSize = sizeof(FIXED_INFO);
@@ -760,15 +760,15 @@ class ModuleDNS : public Module
 
                        if (!DNSServer.empty())
                        {
-                               ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT,"<dns:server> set to '%s' as first active resolver in the system settings.", DNSServer.c_str());
+                               ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "<dns:server> set to '%s' as first active resolver in the system settings.", DNSServer.c_str());
                                return;
                        }
                }
 
-               ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT,"No viable nameserver found! Defaulting to nameserver '127.0.0.1'!");
+               ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "No viable nameserver found! Defaulting to nameserver '127.0.0.1'!");
 #else
                // attempt to look up their nameserver from /etc/resolv.conf
-               ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT,"WARNING: <dns:server> not defined, attempting to find working server in /etc/resolv.conf...");
+               ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "WARNING: <dns:server> not defined, attempting to find working server in /etc/resolv.conf...");
 
                std::ifstream resolv("/etc/resolv.conf");
 
@@ -779,13 +779,13 @@ class ModuleDNS : public Module
                                resolv >> DNSServer;
                                if (DNSServer.find_first_not_of("0123456789.") == std::string::npos)
                                {
-                                       ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT,"<dns:server> set to '%s' as first resolver in /etc/resolv.conf.",DNSServer.c_str());
+                                       ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "<dns:server> set to '%s' as first resolver in /etc/resolv.conf.",DNSServer.c_str());
                                        return;
                                }
                        }
                }
 
-               ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT,"/etc/resolv.conf contains no viable nameserver entries! Defaulting to nameserver '127.0.0.1'!");
+               ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "/etc/resolv.conf contains no viable nameserver entries! Defaulting to nameserver '127.0.0.1'!");
 #endif
                DNSServer = "127.0.0.1";
        }
index 3bbd58eb1b976f85def71f07e4f28a3ca224f0d3..71a32e610102d06dda98aecae1b5fbdb2fa2a6e3 100644 (file)
@@ -92,7 +92,7 @@ class UserResolver : public DNS::Request
                        catch (DNS::Exception& e)
                        {
                                delete res_forward;
-                               ServerInstance->Logs->Log("RESOLVER", LOG_DEBUG,"Error in resolver: %s",e.GetReason());
+                               ServerInstance->Logs->Log("RESOLVER", LOG_DEBUG, "Error in resolver: %s",e.GetReason());
 
                                bound_user->WriteNotice("*** There was an internal error resolving your host, using your IP address (" + bound_user->GetIPString() + ") instead.");
                                dl->set(bound_user, 0);
@@ -224,7 +224,7 @@ class ModuleHostnameLookup : public Module
                {
                        this->dnsLookup.set(user, 0);
                        delete res_reverse;
-                       ServerInstance->Logs->Log("USERS", LOG_DEBUG,"Error in resolver: %s", e.GetReason());
+                       ServerInstance->Logs->Log("USERS", LOG_DEBUG, "Error in resolver: %s", e.GetReason());
                        ServerInstance->stats->statsDnsBad++;
                }
        }
index 4fa360b158691ec77d90b3dec9856c075be31c32..6bf657115275e658795691c7650d9cd1d719b193 100644 (file)
@@ -125,7 +125,7 @@ CmdResult CommandKill::Handle (const std::vector<std::string>& parameters, User
                                ServerInstance->SNO->WriteGlobalSno('k',"Local Kill by %s: %s (%s)", user->nick.c_str(), u->GetFullRealHost().c_str(), parameters[1].c_str());
                        else
                                ServerInstance->SNO->WriteToSnoMask('k',"Local Kill by %s: %s (%s)", user->nick.c_str(), u->GetFullRealHost().c_str(), parameters[1].c_str());
-                       ServerInstance->Logs->Log("KILL",LOG_DEFAULT,"LOCAL KILL: %s :%s!%s!%s (%s)", u->nick.c_str(), ServerInstance->Config->ServerName.c_str(), user->dhost.c_str(), user->nick.c_str(), parameters[1].c_str());
+                       ServerInstance->Logs->Log("KILL", LOG_DEFAULT, "LOCAL KILL: %s :%s!%s!%s (%s)", u->nick.c_str(), ServerInstance->Config->ServerName.c_str(), user->dhost.c_str(), user->nick.c_str(), parameters[1].c_str());
                        /* Bug #419, make sure this message can only occur once even in the case of multiple KILL messages crossing the network, and change to show
                         * hidekillsserver as source if possible
                         */
index 15ee9c969f06a959b21457bbbf3cec78192c2a49..e1018f805c4f73cca58857d1275f4514fab5c61b 100644 (file)
@@ -80,7 +80,7 @@ CmdResult CommandOper::HandleLocal(const std::vector<std::string>& parameters, L
        user->CommandFloodPenalty += 10000;
 
        ServerInstance->SNO->WriteGlobalSno('o', "WARNING! Failed oper attempt by %s using login '%s': The following fields do not match: %s", user->GetFullRealHost().c_str(), parameters[0].c_str(), fields.c_str());
-       ServerInstance->Logs->Log("OPER",LOG_DEFAULT,"OPER: Failed oper attempt by %s using login '%s': The following fields did not match: %s", user->GetFullRealHost().c_str(), parameters[0].c_str(), fields.c_str());
+       ServerInstance->Logs->Log("OPER", LOG_DEFAULT, "OPER: Failed oper attempt by %s using login '%s': The following fields did not match: %s", user->GetFullRealHost().c_str(), parameters[0].c_str(), fields.c_str());
        return CMD_FAILURE;
 }
 
index 174e660635f39863cdbd3df2171fda274c2c68a9..6711ada7decd2ef5e73b6ee31939f67bd4c41806 100644 (file)
@@ -39,7 +39,7 @@ class CommandRestart : public Command
 
 CmdResult CommandRestart::Handle (const std::vector<std::string>& parameters, User *user)
 {
-       ServerInstance->Logs->Log("COMMAND",LOG_DEFAULT,"Restart: %s",user->nick.c_str());
+       ServerInstance->Logs->Log("COMMAND", LOG_DEFAULT, "Restart: %s",user->nick.c_str());
        if (!ServerInstance->PassCompare(user, ServerInstance->Config->restartpass, parameters[0].c_str(), ServerInstance->Config->powerhash))
        {
                ServerInstance->SNO->WriteGlobalSno('a', "RESTART command from %s, restarting server.", user->GetFullRealHost().c_str());
index 2779f29ba502e531029198eda0417d01e558d0bb..a973e44ccc20b9d66b3da00ebeff3a3ecf8292d2 100644 (file)
@@ -183,7 +183,7 @@ void CommandWhowas::PruneWhoWas(time_t t)
                        if (iter == whowas.end())
                        {
                                /* this should never happen, if it does maps are corrupt */
-                               ServerInstance->Logs->Log("WHOWAS",LOG_DEFAULT, "BUG: Whowas maps got corrupted! (1)");
+                               ServerInstance->Logs->Log("WHOWAS", LOG_DEFAULT, "BUG: Whowas maps got corrupted! (1)");
                                return;
                        }
 
@@ -216,7 +216,7 @@ void CommandWhowas::PruneWhoWas(time_t t)
                if (iter == whowas.end())
                {
                        /* this should never happen, if it does maps are corrupt */
-                       ServerInstance->Logs->Log("WHOWAS",LOG_DEFAULT, "BUG: Whowas maps got corrupted! (2)");
+                       ServerInstance->Logs->Log("WHOWAS", LOG_DEFAULT, "BUG: Whowas maps got corrupted! (2)");
                        return;
                }
                whowas_set* n = (whowas_set*)iter->second;
@@ -264,7 +264,7 @@ CommandWhowas::~CommandWhowas()
                if (iter == whowas.end())
                {
                        /* this should never happen, if it does maps are corrupt */
-                       ServerInstance->Logs->Log("WHOWAS",LOG_DEFAULT, "BUG: Whowas maps got corrupted! (3)");
+                       ServerInstance->Logs->Log("WHOWAS", LOG_DEFAULT, "BUG: Whowas maps got corrupted! (3)");
                        return;
                }
 
index ec6a6c8e53e9876fc79c663e724f0ca66704d12c..61cdb55fa160ded9627f7b90cc369bfc6793aaa2 100644 (file)
@@ -399,7 +399,7 @@ bool ConfigTag::readString(const std::string& key, std::string& value, bool allo
                value = j->second;
                if (!allow_lf && (value.find('\n') != std::string::npos))
                {
-                       ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT, "Value of <" + tag + ":" + key + "> at " + getTagLocation() +
+                       ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "Value of <" + tag + ":" + key + "> at " + getTagLocation() +
                                " contains a linefeed, and linefeeds in this value are not permitted -- stripped to spaces.");
                        for (std::string::iterator n = value.begin(); n != value.end(); n++)
                                if (*n == '\n')
@@ -462,7 +462,7 @@ bool ConfigTag::getBool(const std::string &key, bool def)
        if (result == "no" || result == "false" || result == "0" || result == "off")
                return false;
 
-       ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT, "Value of <" + tag + ":" + key + "> at " + getTagLocation() +
+       ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "Value of <" + tag + ":" + key + "> at " + getTagLocation() +
                " is not valid, ignoring");
        return def;
 }
index 943fa5a41520ac18e8806b27bcf75bb4aee9b95b..8951ec0eede43f6344cf2b65ee1292a21395d9d8 100644 (file)
@@ -50,8 +50,7 @@ static void range(T& value, V min, V max, V def, const char* msg)
 {
        if (value >= (T)min && value <= (T)max)
                return;
-       ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT,
-               "WARNING: %s value of %ld is not between %ld and %ld; set to %ld.",
+       ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "WARNING: %s value of %ld is not between %ld and %ld; set to %ld.",
                msg, (long)value, (long)min, (long)max, (long)def);
        value = def;
 }
@@ -608,7 +607,7 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
        User* user = useruid.empty() ? NULL : ServerInstance->FindNick(useruid);
 
        if (!valid)
-               ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT, "There were errors in your configuration file:");
+               ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "There were errors in your configuration file:");
 
        while (errstr.good())
        {
@@ -750,7 +749,7 @@ ConfigTag* ServerConfig::ConfValue(const std::string &tag)
        ConfigTag* rv = found.first->second;
        found.first++;
        if (found.first != found.second)
-               ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT, "Multiple <" + tag + "> tags found; only first will be used "
+               ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "Multiple <" + tag + "> tags found; only first will be used "
                        "(first at " + rv->getTagLocation() + "; second at " + found.first->second->getTagLocation() + ")");
        return rv;
 }
@@ -800,7 +799,7 @@ void ConfigReaderThread::Run()
 void ConfigReaderThread::Finish()
 {
        ServerConfig* old = ServerInstance->Config;
-       ServerInstance->Logs->Log("CONFIG",LOG_DEBUG,"Switching to new configuration...");
+       ServerInstance->Logs->Log("CONFIG", LOG_DEBUG, "Switching to new configuration...");
        ServerInstance->Config = this->Config;
        Config->Apply(old, TheUserUID);
 
index 5bb23b87885244a8745c52abf5b802927ef6d6fb..5cbe3aef3575bd3d27e23098b8a175a06056dc5a 100644 (file)
@@ -53,7 +53,7 @@ void CullList::Apply()
                }
                else
                {
-                       ServerInstance->Logs->Log("CULLLIST",LOG_DEBUG, "WARNING: Object @%p culled twice!",
+                       ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "WARNING: Object @%p culled twice!",
                                (void*)c);
                }
        }
@@ -65,7 +65,7 @@ void CullList::Apply()
        }
        if (list.size())
        {
-               ServerInstance->Logs->Log("CULLLIST",LOG_DEBUG, "WARNING: Objects added to cull list in a destructor");
+               ServerInstance->Logs->Log("CULLLIST", LOG_DEBUG, "WARNING: Objects added to cull list in a destructor");
                Apply();
        }
 }
index ab2ed5682414cbc46422797624f513f2f02c5c06..63123738ef29ea811ab3556713cb142bd3d1dc76 100644 (file)
@@ -331,7 +331,7 @@ void InspIRCd::CheckRoot()
        if (geteuid() == 0)
        {
                std::cout << "ERROR: You are running an irc server as root! DO NOT DO THIS!" << std::endl << std::endl;
-               this->Logs->Log("STARTUP",LOG_DEFAULT,"Can't start as root");
+               this->Logs->Log("STARTUP", LOG_DEFAULT, "Can't start as root");
                Exit(EXIT_STATUS_ROOT);
        }
 #endif
index 659bb31a1e8c5cd3481e635c7d1006ea00242aab..fe33045692ede0004cedd1c8fcdb33cb94f2c6ab 100644 (file)
@@ -230,13 +230,13 @@ bool InspIRCd::DaemonSeed()
        rlimit rl;
        if (getrlimit(RLIMIT_CORE, &rl) == -1)
        {
-               this->Logs->Log("STARTUP",LOG_DEFAULT,"Failed to getrlimit()!");
+               this->Logs->Log("STARTUP", LOG_DEFAULT, "Failed to getrlimit()!");
                return false;
        }
        rl.rlim_cur = rl.rlim_max;
 
        if (setrlimit(RLIMIT_CORE, &rl) == -1)
-                       this->Logs->Log("STARTUP",LOG_DEFAULT,"setrlimit() failed, cannot increase coredump size.");
+                       this->Logs->Log("STARTUP", LOG_DEFAULT, "setrlimit() failed, cannot increase coredump size.");
 
        return true;
 #endif
@@ -257,7 +257,7 @@ void InspIRCd::WritePID(const std::string &filename)
        else
        {
                std::cout << "Failed to write PID-file '" << fname << "', exiting." << std::endl;
-               this->Logs->Log("STARTUP",LOG_DEFAULT,"Failed to write PID-file '%s', exiting.",fname.c_str());
+               this->Logs->Log("STARTUP", LOG_DEFAULT, "Failed to write PID-file '%s', exiting.",fname.c_str());
                Exit(EXIT_STATUS_PID);
        }
 #endif
@@ -440,7 +440,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
 #endif
                {
                        std::cout << "ERROR: Cannot open config file: " << ConfigFileName << std::endl << "Exiting..." << std::endl;
-                       this->Logs->Log("STARTUP",LOG_DEFAULT,"Unable to open config file %s", ConfigFileName.c_str());
+                       this->Logs->Log("STARTUP", LOG_DEFAULT, "Unable to open config file %s", ConfigFileName.c_str());
                        Exit(EXIT_STATUS_CONFIG);
                }
        }
@@ -571,7 +571,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
        }
        else
        {
-               Logs->Log("STARTUP", LOG_DEFAULT,"Keeping pseudo-tty open as we are running in the foreground.");
+               Logs->Log("STARTUP", LOG_DEFAULT, "Keeping pseudo-tty open as we are running in the foreground.");
        }
 #else
        /* Set win32 service as running, if we are running as a service */
@@ -695,7 +695,7 @@ int InspIRCd::Run()
                if (this->ConfigThread && this->ConfigThread->IsDone())
                {
                        /* Rehash has completed */
-                       this->Logs->Log("CONFIG",LOG_DEBUG,"Detected ConfigThread exiting, tidying up...");
+                       this->Logs->Log("CONFIG", LOG_DEBUG, "Detected ConfigThread exiting, tidying up...");
 
                        this->ConfigThread->Finish();
 
index 34d7d3f8c6255a952acf32336e130dc2fdf1b596..3a8a58b5fd4eba87015bb8582a22d7920fe9e81c 100644 (file)
@@ -112,7 +112,7 @@ BufferedSocketError BufferedSocket::BeginConnect(const irc::sockets::sockaddrs&
        this->Timeout = new SocketTimeout(this->GetFd(), this, timeout, ServerInstance->Time());
        ServerInstance->Timers->AddTimer(this->Timeout);
 
-       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG,"BufferedSocket::DoConnect success");
+       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "BufferedSocket::DoConnect success");
        return I_ERR_NONE;
 }
 
@@ -130,7 +130,7 @@ void StreamSocket::Close()
                        }
                        catch (CoreException& modexcept)
                        {
-                               ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT,"%s threw an exception: %s",
+                               ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "%s threw an exception: %s",
                                        modexcept.GetSource(), modexcept.GetReason());
                        }
                        IOHook = NULL;
@@ -317,7 +317,7 @@ void StreamSocket::DoWrite()
                }
                catch (CoreException& modexcept)
                {
-                       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG,"%s threw an exception: %s",
+                       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "%s threw an exception: %s",
                                modexcept.GetSource(), modexcept.GetReason());
                }
        }
@@ -433,7 +433,7 @@ void StreamSocket::WriteData(const std::string &data)
 
 bool SocketTimeout::Tick(time_t)
 {
-       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG,"SocketTimeout::Tick");
+       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "SocketTimeout::Tick");
 
        if (ServerInstance->SE->GetRef(this->sfd) != this->sock)
                return false;
index 8ac8babf3a5023580ab77af1acc192e38c49ff89..466b91c8bb56643ae40a170f9f617833eb217971 100644 (file)
@@ -74,10 +74,10 @@ ListenSocket::~ListenSocket()
        if (this->GetFd() > -1)
        {
                ServerInstance->SE->DelFd(this);
-               ServerInstance->Logs->Log("SOCKET", LOG_DEBUG,"Shut down listener on fd %d", this->fd);
+               ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "Shut down listener on fd %d", this->fd);
                ServerInstance->SE->Shutdown(this, 2);
                if (ServerInstance->SE->Close(this) != 0)
-                       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG,"Failed to cancel listener: %s", strerror(errno));
+                       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "Failed to cancel listener: %s", strerror(errno));
                this->fd = -1;
        }
 }
@@ -91,7 +91,7 @@ void ListenSocket::AcceptInternal()
        socklen_t length = sizeof(client);
        int incomingSockfd = ServerInstance->SE->Accept(this, &client.sa, &length);
 
-       ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"HandleEvent for Listensocket %s nfd=%d", bind_desc.c_str(), incomingSockfd);
+       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "HandleEvent for Listensocket %s nfd=%d", bind_desc.c_str(), incomingSockfd);
        if (incomingSockfd < 0)
        {
                ServerInstance->stats->statsRefused++;
@@ -174,7 +174,7 @@ void ListenSocket::AcceptInternal()
        else
        {
                ServerInstance->stats->statsRefused++;
-               ServerInstance->Logs->Log("SOCKET",LOG_DEFAULT,"Refusing connection on %s - %s",
+               ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "Refusing connection on %s - %s",
                        bind_desc.c_str(), res == MOD_RES_DENY ? "Connection refused by module" : "Module for this port not found");
                ServerInstance->SE->Close(incomingSockfd);
        }
@@ -185,10 +185,10 @@ void ListenSocket::HandleEvent(EventType e, int err)
        switch (e)
        {
                case EVENT_ERROR:
-                       ServerInstance->Logs->Log("SOCKET",LOG_DEFAULT,"ListenSocket::HandleEvent() received a socket engine error event! well shit! '%s'", strerror(err));
+                       ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "ListenSocket::HandleEvent() received a socket engine error event! well shit! '%s'", strerror(err));
                        break;
                case EVENT_WRITE:
-                       ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"*** BUG *** ListenSocket::HandleEvent() got a WRITE event!!!");
+                       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "*** BUG *** ListenSocket::HandleEvent() got a WRITE event!!!");
                        break;
                case EVENT_READ:
                        this->AcceptInternal();
index b586976793844028a3dc80a69d1cc31c9f6404f6..b9c046a8e78e67959669147072881fc39a455a42 100644 (file)
@@ -69,7 +69,7 @@ bool ModuleManager::Load(const std::string& filename, bool defer)
                        std::string version = newhandle->GetVersion();
                        if (defer)
                        {
-                               ServerInstance->Logs->Log("MODULE", LOG_DEFAULT,"New module introduced: %s (Module version %s)",
+                               ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "New module introduced: %s (Module version %s)",
                                        filename.c_str(), version.c_str());
                        }
                        else
@@ -77,7 +77,7 @@ bool ModuleManager::Load(const std::string& filename, bool defer)
                                newmod->init();
 
                                Version v = newmod->GetVersion();
-                               ServerInstance->Logs->Log("MODULE", LOG_DEFAULT,"New module introduced: %s (Module version %s)%s",
+                               ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "New module introduced: %s (Module version %s)%s",
                                        filename.c_str(), version.c_str(), (!(v.Flags & VF_VENDOR) ? " [3rd Party]" : " [Vendor]"));
                        }
                }
index 4c46241958d0da7f3d7630906a01978e615161c0..54813896e43bab568fe7f3d84dcf1448a2cf2ce1 100644 (file)
@@ -97,7 +97,7 @@ bool ModuleManager::Load(const std::string& name, bool defer)
                Modules[name] = mod;
                if (defer)
                {
-                       ServerInstance->Logs->Log("MODULE", LOG_DEFAULT,"New module introduced: %s", name.c_str());
+                       ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "New module introduced: %s", name.c_str());
                        return true;
                }
                else
index 63e1118d93680efaa30d896062dd42c55a93800c..b7ceb072a9801586828435a32240ad199bd6ca21 100644 (file)
@@ -393,7 +393,7 @@ void ModuleManager::DoSafeUnload(Module* mod)
        Modules.erase(modfind);
        ServerInstance->GlobalCulls.AddItem(mod);
 
-       ServerInstance->Logs->Log("MODULE", LOG_DEFAULT,"Module %s unloaded",mod->ModuleSourceFile.c_str());
+       ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "Module %s unloaded",mod->ModuleSourceFile.c_str());
        this->ModCount--;
        ServerInstance->ISupport.Build();
 }
index 51eb9b9ddf51a973f9b81849e55e7b77fbd53db0..244aa0922a006cecc04020d867ae2a71c60976c6 100644 (file)
@@ -254,7 +254,7 @@ class SQLConn : public classbase
                                if (tds_process_simple_query(sock) != TDS_SUCCEED)
                                {
                                        LoggingMutex->Lock();
-                                       ServerInstance->Logs->Log("m_mssql",LOG_DEFAULT, "WARNING: Could not select database " + host.name + " for DB with id: " + host.id);
+                                       ServerInstance->Logs->Log("m_mssql", LOG_DEFAULT, "WARNING: Could not select database " + host.name + " for DB with id: " + host.id);
                                        LoggingMutex->Unlock();
                                        CloseDB();
                                }
@@ -262,7 +262,7 @@ class SQLConn : public classbase
                        else
                        {
                                LoggingMutex->Lock();
-                               ServerInstance->Logs->Log("m_mssql",LOG_DEFAULT, "WARNING: Could not select database " + host.name + " for DB with id: " + host.id);
+                               ServerInstance->Logs->Log("m_mssql", LOG_DEFAULT, "WARNING: Could not select database " + host.name + " for DB with id: " + host.id);
                                LoggingMutex->Unlock();
                                CloseDB();
                        }
@@ -270,7 +270,7 @@ class SQLConn : public classbase
                else
                {
                        LoggingMutex->Lock();
-                       ServerInstance->Logs->Log("m_mssql",LOG_DEFAULT, "WARNING: Could not connect to DB with id: " + host.id);
+                       ServerInstance->Logs->Log("m_mssql", LOG_DEFAULT, "WARNING: Could not connect to DB with id: " + host.id);
                        LoggingMutex->Unlock();
                        CloseDB();
                }
@@ -429,7 +429,7 @@ class SQLConn : public classbase
 
                char* msquery = strdup(req->query.q.data());
                LoggingMutex->Lock();
-               ServerInstance->Logs->Log("m_mssql",LOG_DEBUG,"doing Query: %s",msquery);
+               ServerInstance->Logs->Log("m_mssql", LOG_DEBUG, "doing Query: %s",msquery);
                LoggingMutex->Unlock();
                if (tds_submit_query(sock, msquery) != TDS_SUCCEED)
                {
@@ -445,8 +445,8 @@ class SQLConn : public classbase
                int tds_res;
                while (tds_process_tokens(sock, &tds_res, NULL, TDS_TOKEN_RESULTS) == TDS_SUCCEED)
                {
-                       //ServerInstance->Logs->Log("m_mssql",LOG_DEBUG,"<******> result type: %d", tds_res);
-                       //ServerInstance->Logs->Log("m_mssql",LOG_DEBUG,"AFFECTED ROWS: %d", sock->rows_affected);
+                       //ServerInstance->Logs->Log("m_mssql", LOG_DEBUG, "<******> result type: %d", tds_res);
+                       //ServerInstance->Logs->Log("m_mssql", LOG_DEBUG, "AFFECTED ROWS: %d", sock->rows_affected);
                        switch (tds_res)
                        {
                                case TDS_ROWFMT_RESULT:
@@ -749,7 +749,7 @@ class ModuleMsSQL : public Module
                if (HasHost(hi))
                {
                        LoggingMutex->Lock();
-                       ServerInstance->Logs->Log("m_mssql",LOG_DEFAULT, "WARNING: A MsSQL connection with id: %s already exists. Aborting database open attempt.", hi.id.c_str());
+                       ServerInstance->Logs->Log("m_mssql", LOG_DEFAULT, "WARNING: A MsSQL connection with id: %s already exists. Aborting database open attempt.", hi.id.c_str());
                        LoggingMutex->Unlock();
                        return;
                }
index 5192716a63950c824cdc6249cf024cf228582faf..3df6b91bd098c35dce269899e0ab1c88dedab9ea 100644 (file)
@@ -152,7 +152,7 @@ class SQLConn : public SQLProvider, public EventHandler
        {
                if (!DoConnect())
                {
-                       ServerInstance->Logs->Log("m_pgsql",LOG_DEFAULT, "WARNING: Could not connect to database " + tag->getString("id"));
+                       ServerInstance->Logs->Log("m_pgsql", LOG_DEFAULT, "WARNING: Could not connect to database " + tag->getString("id"));
                        DelayReconnect();
                }
        }
@@ -244,7 +244,7 @@ class SQLConn : public SQLProvider, public EventHandler
 
                if (!ServerInstance->SE->AddFd(this, FD_WANT_NO_WRITE | FD_WANT_NO_READ))
                {
-                       ServerInstance->Logs->Log("m_pgsql",LOG_DEBUG, "BUG: Couldn't add pgsql socket to socket engine");
+                       ServerInstance->Logs->Log("m_pgsql", LOG_DEBUG, "BUG: Couldn't add pgsql socket to socket engine");
                        return false;
                }
 
index a35888cd68eb54ec6e3ef9b168546e4e1328c527..254adf1025ce98dbe3548106cfcd50c211d7837e 100644 (file)
@@ -85,7 +85,7 @@ class SQLConn : public SQLProvider
                std::string host = tag->getString("hostname");
                if (sqlite3_open_v2(host.c_str(), &conn, SQLITE_OPEN_READWRITE, 0) != SQLITE_OK)
                {
-                       ServerInstance->Logs->Log("m_sqlite3",LOG_DEFAULT, "WARNING: Could not open DB with id: " + tag->getString("id"));
+                       ServerInstance->Logs->Log("m_sqlite3", LOG_DEFAULT, "WARNING: Could not open DB with id: " + tag->getString("id"));
                        conn = NULL;
                }
        }
index 2ae16c619b71d6474e5323f217d46c1f417ae874..5ae530608d494819c13fb7963569cfba952343f6 100644 (file)
@@ -350,13 +350,13 @@ class ModuleSSLGnuTLS : public Module
                ret = gnutls_certificate_allocate_credentials(&x509_cred);
                cred_alloc = (ret >= 0);
                if (!cred_alloc)
-                       ServerInstance->Logs->Log("m_ssl_gnutls",LOG_DEBUG, "m_ssl_gnutls.so: Failed to allocate certificate credentials: %s", gnutls_strerror(ret));
+                       ServerInstance->Logs->Log("m_ssl_gnutls", LOG_DEBUG, "m_ssl_gnutls.so: Failed to allocate certificate credentials: %s", gnutls_strerror(ret));
 
                if((ret =gnutls_certificate_set_x509_trust_file(x509_cred, cafile.c_str(), GNUTLS_X509_FMT_PEM)) < 0)
-                       ServerInstance->Logs->Log("m_ssl_gnutls",LOG_DEBUG, "m_ssl_gnutls.so: Failed to set X.509 trust file '%s': %s", cafile.c_str(), gnutls_strerror(ret));
+                       ServerInstance->Logs->Log("m_ssl_gnutls", LOG_DEBUG, "m_ssl_gnutls.so: Failed to set X.509 trust file '%s': %s", cafile.c_str(), gnutls_strerror(ret));
 
                if((ret = gnutls_certificate_set_x509_crl_file (x509_cred, crlfile.c_str(), GNUTLS_X509_FMT_PEM)) < 0)
-                       ServerInstance->Logs->Log("m_ssl_gnutls",LOG_DEBUG, "m_ssl_gnutls.so: Failed to set X.509 CRL file '%s': %s", crlfile.c_str(), gnutls_strerror(ret));
+                       ServerInstance->Logs->Log("m_ssl_gnutls", LOG_DEBUG, "m_ssl_gnutls.so: Failed to set X.509 CRL file '%s': %s", crlfile.c_str(), gnutls_strerror(ret));
 
                FileReader reader;
 
@@ -405,13 +405,13 @@ class ModuleSSLGnuTLS : public Module
                if ((ret = gnutls_priority_init(&priority, priocstr, &prioerror)) < 0)
                {
                        // gnutls did not understand the user supplied string, log and fall back to the default priorities
-                       ServerInstance->Logs->Log("m_ssl_gnutls",LOG_DEFAULT, "m_ssl_gnutls.so: Failed to set priorities to \"%s\": %s Syntax error at position %u, falling back to default (NORMAL)", priorities.c_str(), gnutls_strerror(ret), (unsigned int) (prioerror - priocstr));
+                       ServerInstance->Logs->Log("m_ssl_gnutls", LOG_DEFAULT, "m_ssl_gnutls.so: Failed to set priorities to \"%s\": %s Syntax error at position %u, falling back to default (NORMAL)", priorities.c_str(), gnutls_strerror(ret), (unsigned int) (prioerror - priocstr));
                        gnutls_priority_init(&priority, "NORMAL", NULL);
                }
 
                #else
                if (priorities != "NORMAL")
-                       ServerInstance->Logs->Log("m_ssl_gnutls",LOG_DEFAULT, "m_ssl_gnutls.so: You've set <gnutls:priority> to a value other than the default, but this is only supported with GnuTLS v2.1.7 or newer. Your GnuTLS version is older than that so the option will have no effect.");
+                       ServerInstance->Logs->Log("m_ssl_gnutls", LOG_DEFAULT, "m_ssl_gnutls.so: You've set <gnutls:priority> to a value other than the default, but this is only supported with GnuTLS v2.1.7 or newer. Your GnuTLS version is older than that so the option will have no effect.");
                #endif
 
                #if(GNUTLS_VERSION_MAJOR < 2 || ( GNUTLS_VERSION_MAJOR == 2 && GNUTLS_VERSION_MINOR < 12 ) )
@@ -461,7 +461,7 @@ class ModuleSSLGnuTLS : public Module
                int ret;
 
                if((ret = gnutls_dh_params_generate2(dh_params, dh_bits)) < 0)
-                       ServerInstance->Logs->Log("m_ssl_gnutls",LOG_DEFAULT, "m_ssl_gnutls.so: Failed to generate DH parameters (%d bits): %s", dh_bits, gnutls_strerror(ret));
+                       ServerInstance->Logs->Log("m_ssl_gnutls", LOG_DEFAULT, "m_ssl_gnutls.so: Failed to generate DH parameters (%d bits): %s", dh_bits, gnutls_strerror(ret));
        }
 
        ~ModuleSSLGnuTLS()
index 23e770c8b11bdc78b1dc9e1c56fa60f8736b5b3e..1fa6763ce4efbc3e8951eeffe65e499379808a75 100644 (file)
@@ -219,7 +219,7 @@ class ModuleSSLOpenSSL : public Module
                {
                        if ((!SSL_CTX_set_cipher_list(ctx, ciphers.c_str())) || (!SSL_CTX_set_cipher_list(clictx, ciphers.c_str())))
                        {
-                               ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEFAULT, "m_ssl_openssl.so: Can't set cipher list to %s.", ciphers.c_str());
+                               ServerInstance->Logs->Log("m_ssl_openssl", LOG_DEFAULT, "m_ssl_openssl.so: Can't set cipher list to %s.", ciphers.c_str());
                                ERR_print_errors_cb(error_callback, this);
                        }
                }
@@ -229,20 +229,20 @@ class ModuleSSLOpenSSL : public Module
                 */
                if ((!SSL_CTX_use_certificate_chain_file(ctx, certfile.c_str())) || (!SSL_CTX_use_certificate_chain_file(clictx, certfile.c_str())))
                {
-                       ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEFAULT, "m_ssl_openssl.so: Can't read certificate file %s. %s", certfile.c_str(), strerror(errno));
+                       ServerInstance->Logs->Log("m_ssl_openssl", LOG_DEFAULT, "m_ssl_openssl.so: Can't read certificate file %s. %s", certfile.c_str(), strerror(errno));
                        ERR_print_errors_cb(error_callback, this);
                }
 
                if (((!SSL_CTX_use_PrivateKey_file(ctx, keyfile.c_str(), SSL_FILETYPE_PEM))) || (!SSL_CTX_use_PrivateKey_file(clictx, keyfile.c_str(), SSL_FILETYPE_PEM)))
                {
-                       ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEFAULT, "m_ssl_openssl.so: Can't read key file %s. %s", keyfile.c_str(), strerror(errno));
+                       ServerInstance->Logs->Log("m_ssl_openssl", LOG_DEFAULT, "m_ssl_openssl.so: Can't read key file %s. %s", keyfile.c_str(), strerror(errno));
                        ERR_print_errors_cb(error_callback, this);
                }
 
                /* Load the CAs we trust*/
                if (((!SSL_CTX_load_verify_locations(ctx, cafile.c_str(), 0))) || (!SSL_CTX_load_verify_locations(clictx, cafile.c_str(), 0)))
                {
-                       ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEFAULT, "m_ssl_openssl.so: Can't read CA list from %s. This is only a problem if you want to verify client certificates, otherwise it's safe to ignore this message. Error: %s", cafile.c_str(), strerror(errno));
+                       ServerInstance->Logs->Log("m_ssl_openssl", LOG_DEFAULT, "m_ssl_openssl.so: Can't read CA list from %s. This is only a problem if you want to verify client certificates, otherwise it's safe to ignore this message. Error: %s", cafile.c_str(), strerror(errno));
                        ERR_print_errors_cb(error_callback, this);
                }
 
@@ -251,7 +251,7 @@ class ModuleSSLOpenSSL : public Module
 
                if (dhpfile == NULL)
                {
-                       ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEFAULT, "m_ssl_openssl.so Couldn't open DH file %s: %s", dhfile.c_str(), strerror(errno));
+                       ServerInstance->Logs->Log("m_ssl_openssl", LOG_DEFAULT, "m_ssl_openssl.so Couldn't open DH file %s: %s", dhfile.c_str(), strerror(errno));
                        throw ModuleException("Couldn't open DH file " + dhfile + ": " + strerror(errno));
                }
                else
@@ -259,7 +259,7 @@ class ModuleSSLOpenSSL : public Module
                        ret = PEM_read_DHparams(dhpfile, NULL, NULL, NULL);
                        if ((SSL_CTX_set_tmp_dh(ctx, ret) < 0) || (SSL_CTX_set_tmp_dh(clictx, ret) < 0))
                        {
-                               ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEFAULT, "m_ssl_openssl.so: Couldn't set DH parameters %s. SSL errors follow:", dhfile.c_str());
+                               ServerInstance->Logs->Log("m_ssl_openssl", LOG_DEFAULT, "m_ssl_openssl.so: Couldn't set DH parameters %s. SSL errors follow:", dhfile.c_str());
                                ERR_print_errors_cb(error_callback, this);
                        }
                }
@@ -343,7 +343,7 @@ class ModuleSSLOpenSSL : public Module
 
                if (SSL_set_fd(session->sess, fd) == 0)
                {
-                       ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEBUG,"BUG: Can't set fd with SSL_set_fd: %d", fd);
+                       ServerInstance->Logs->Log("m_ssl_openssl", LOG_DEBUG, "BUG: Can't set fd with SSL_set_fd: %d", fd);
                        return;
                }
 
@@ -368,7 +368,7 @@ class ModuleSSLOpenSSL : public Module
 
                if (SSL_set_fd(session->sess, fd) == 0)
                {
-                       ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEBUG,"BUG: Can't set fd with SSL_set_fd: %d", fd);
+                       ServerInstance->Logs->Log("m_ssl_openssl", LOG_DEBUG, "BUG: Can't set fd with SSL_set_fd: %d", fd);
                        return;
                }
 
@@ -649,7 +649,7 @@ class ModuleSSLOpenSSL : public Module
 
 static int error_callback(const char *str, size_t len, void *u)
 {
-       ServerInstance->Logs->Log("m_ssl_openssl",LOG_DEFAULT, "SSL error: " + std::string(str, len - 1));
+       ServerInstance->Logs->Log("m_ssl_openssl", LOG_DEFAULT, "SSL error: " + std::string(str, len - 1));
 
        //
        // XXX: Remove this line, it causes valgrind warnings...
index c9c14f01b31e2fe189f8e603a5bef68d29802d14..1886b39bd2f52161e356674d4c709aec0c54055f 100644 (file)
@@ -121,12 +121,12 @@ public:
                        capsmap[(unsigned char)*n] = 1;
                if (percent < 1 || percent > 100)
                {
-                       ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT, "<blockcaps:percent> out of range, setting to default of 100.");
+                       ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "<blockcaps:percent> out of range, setting to default of 100.");
                        percent = 100;
                }
                if (minlen < 1 || minlen > MAXBUF-1)
                {
-                       ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT, "<blockcaps:minlen> out of range, setting to default of 1.");
+                       ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "<blockcaps:minlen> out of range, setting to default of 1.");
                        minlen = 1;
                }
        }
index 88c73c424b667214f92b3465b3855231bfcc2531..d2f24f9109999dd4010bcb986a37dff23e1b9cf9 100644 (file)
@@ -265,7 +265,7 @@ public:
                        {
                                if (type == "webirc" && password.empty())
                                {
-                                       ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT, "m_cgiirc: Missing password in config: %s", hostmask.c_str());
+                                       ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "m_cgiirc: Missing password in config: %s", hostmask.c_str());
                                }
                                else
                                {
@@ -281,7 +281,7 @@ public:
                                        else
                                        {
                                                cgitype = PASS;
-                                               ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT, "m_cgiirc.so: Invalid <cgihost:type> value in config: %s, setting it to \"pass\"", type.c_str());
+                                               ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "m_cgiirc.so: Invalid <cgihost:type> value in config: %s, setting it to \"pass\"", type.c_str());
                                        }
 
                                        cmd.Hosts.push_back(CGIhost(hostmask, cgitype, password));
@@ -289,7 +289,7 @@ public:
                        }
                        else
                        {
-                               ServerInstance->Logs->Log("CONFIG",LOG_DEFAULT, "m_cgiirc.so: Invalid <cgihost:mask> value in config: %s", hostmask.c_str());
+                               ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "m_cgiirc.so: Invalid <cgihost:mask> value in config: %s", hostmask.c_str());
                                continue;
                        }
                }
index f54c4efa2736f64012635ba07054b7dd690e35ef..d741dfb36f7cdd360bcf1d45461c49b914e5175b 100644 (file)
@@ -114,7 +114,7 @@ class ModuleConnectBan : public Module
 
        void OnGarbageCollect()
        {
-               ServerInstance->Logs->Log("m_connectban",LOG_DEBUG, "Clearing map.");
+               ServerInstance->Logs->Log("m_connectban", LOG_DEBUG, "Clearing map.");
                connects.clear();
        }
 };
index 949d0e6e6d88713aa254727fddd31697b77c6c76..4d4e2eb51a8407db80b5026cda27e7566da0313b 100644 (file)
@@ -388,7 +388,7 @@ ModResult ModuleFilter::OnUserPreNotice(User* user,void* dest,int target_type, s
                                delete gl;
                }
 
-               ServerInstance->Logs->Log("FILTER",LOG_DEFAULT,"FILTER: "+ user->nick + " had their message filtered, target was " + target + ": " + f->reason + " Action: " + ModuleFilter::FilterActionToString(f->action));
+               ServerInstance->Logs->Log("FILTER", LOG_DEFAULT, "FILTER: "+ user->nick + " had their message filtered, target was " + target + ": " + f->reason + " Action: " + ModuleFilter::FilterActionToString(f->action));
                return MOD_RES_DENY;
        }
        return MOD_RES_PASSTHRU;
index a1dedec578bcd8d586387f2a8679630d6fba7d70..cbee27958b5aeb4fe85fe2e246ed6a444b26cb78 100644 (file)
@@ -216,7 +216,7 @@ class HttpServerSocket : public BufferedSocket
 
                        if (reqbuffer.length() >= 8192)
                        {
-                               ServerInstance->Logs->Log("m_httpd",LOG_DEBUG, "m_httpd dropped connection due to an oversized request buffer");
+                               ServerInstance->Logs->Log("m_httpd", LOG_DEBUG, "m_httpd dropped connection due to an oversized request buffer");
                                reqbuffer.clear();
                                SetError("Buffer");
                        }
index a556daf396be38eee88a3a89fb63d52266cfd24b..982e514ade8651bf34abb07d1ce85986c5e0c1c4 100644 (file)
@@ -112,7 +112,7 @@ class ModuleHTTPAccessList : public Module
        {
                if (event.id == "httpd_acl")
                {
-                       ServerInstance->Logs->Log("m_http_stats", LOG_DEBUG,"Handling httpd acl event");
+                       ServerInstance->Logs->Log("m_http_stats", LOG_DEBUG, "Handling httpd acl event");
                        HTTPRequest* http = (HTTPRequest*)&event;
 
                        for (std::vector<HTTPACL>::const_iterator this_acl = acl_list.begin(); this_acl != acl_list.end(); ++this_acl)
index 78053d8d54b126265144b375789567667e31f171..a9fdd44fb3b96e3a18f172c8fcc285f461f64a01 100644 (file)
@@ -73,7 +73,7 @@ class ModuleHttpConfig : public Module
 
                if (event.id == "httpd_url")
                {
-                       ServerInstance->Logs->Log("m_http_stats", LOG_DEBUG,"Handling httpd event");
+                       ServerInstance->Logs->Log("m_http_stats", LOG_DEBUG, "Handling httpd event");
                        HTTPRequest* http = (HTTPRequest*)&event;
 
                        if ((http->GetURI() == "/config") || (http->GetURI() == "/config/"))
index 8f25415a95117e40a06154d222d2a3b95c9b8dce..99909d97fac76c47fc72ad3e0f8e222f47e30bbb 100644 (file)
@@ -97,7 +97,7 @@ class ModuleHttpStats : public Module
 
                if (event.id == "httpd_url")
                {
-                       ServerInstance->Logs->Log("m_http_stats", LOG_DEBUG,"Handling httpd event");
+                       ServerInstance->Logs->Log("m_http_stats", LOG_DEBUG, "Handling httpd event");
                        HTTPRequest* http = (HTTPRequest*)&event;
 
                        if ((http->GetURI() == "/stats") || (http->GetURI() == "/stats/"))
index 6e8fd3367d63c02d451ac2e7a5b69b264dd68e04..00ff75f59383df0f42a691c9ac8a558bded4d3c6 100644 (file)
@@ -144,7 +144,7 @@ class IdentRequestSocket : public EventHandler
 
        void OnConnected()
        {
-               ServerInstance->Logs->Log("m_ident",LOG_DEBUG,"OnConnected()");
+               ServerInstance->Logs->Log("m_ident", LOG_DEBUG, "OnConnected()");
                ServerInstance->SE->ChangeEventMask(this, FD_WANT_POLL_READ | FD_WANT_NO_WRITE);
 
                char req[32];
@@ -179,7 +179,7 @@ class IdentRequestSocket : public EventHandler
                        break;
                        case EVENT_ERROR:
                                /* fd error event, ohshi- */
-                               ServerInstance->Logs->Log("m_ident",LOG_DEBUG,"EVENT_ERROR");
+                               ServerInstance->Logs->Log("m_ident", LOG_DEBUG, "EVENT_ERROR");
                                /* We *must* Close() here immediately or we get a
                                 * huge storm of EVENT_ERROR events!
                                 */
@@ -196,7 +196,7 @@ class IdentRequestSocket : public EventHandler
                 */
                if (GetFd() > -1)
                {
-                       ServerInstance->Logs->Log("m_ident",LOG_DEBUG,"Close ident socket %d", GetFd());
+                       ServerInstance->Logs->Log("m_ident", LOG_DEBUG, "Close ident socket %d", GetFd());
                        ServerInstance->SE->DelFd(this);
                        ServerInstance->SE->Close(GetFd());
                        this->SetFd(-1);
@@ -228,7 +228,7 @@ class IdentRequestSocket : public EventHandler
                if (recvresult < 3)
                        return;
 
-               ServerInstance->Logs->Log("m_ident",LOG_DEBUG,"ReadResponse()");
+               ServerInstance->Logs->Log("m_ident", LOG_DEBUG, "ReadResponse()");
 
                /* Truncate at the first null character, but first make sure
                 * there is at least one null char (at the end of the buffer).
@@ -316,7 +316,7 @@ class ModuleIdent : public Module
                }
                catch (ModuleException &e)
                {
-                       ServerInstance->Logs->Log("m_ident",LOG_DEBUG,"Ident exception: %s", e.GetReason());
+                       ServerInstance->Logs->Log("m_ident", LOG_DEBUG, "Ident exception: %s", e.GetReason());
                }
        }
 
@@ -330,11 +330,11 @@ class ModuleIdent : public Module
                IdentRequestSocket *isock = ext.get(user);
                if (!isock)
                {
-                       ServerInstance->Logs->Log("m_ident",LOG_DEBUG, "No ident socket :(");
+                       ServerInstance->Logs->Log("m_ident", LOG_DEBUG, "No ident socket :(");
                        return MOD_RES_PASSTHRU;
                }
 
-               ServerInstance->Logs->Log("m_ident",LOG_DEBUG, "Has ident_socket");
+               ServerInstance->Logs->Log("m_ident", LOG_DEBUG, "Has ident_socket");
 
                time_t compare = isock->age;
                compare += RequestTimeout;
@@ -344,16 +344,16 @@ class ModuleIdent : public Module
                {
                        /* Ident timeout */
                        user->WriteNotice("*** Ident request timed out.");
-                       ServerInstance->Logs->Log("m_ident",LOG_DEBUG, "Timeout");
+                       ServerInstance->Logs->Log("m_ident", LOG_DEBUG, "Timeout");
                }
                else if (!isock->HasResult())
                {
                        // time still good, no result yet... hold the registration
-                       ServerInstance->Logs->Log("m_ident",LOG_DEBUG, "No result yet");
+                       ServerInstance->Logs->Log("m_ident", LOG_DEBUG, "No result yet");
                        return MOD_RES_DENY;
                }
 
-               ServerInstance->Logs->Log("m_ident",LOG_DEBUG, "Yay, result!");
+               ServerInstance->Logs->Log("m_ident", LOG_DEBUG, "Yay, result!");
 
                /* wooo, got a result (it will be good, or bad) */
                if (isock->result.empty())
index 4e921957a338abef8a732da5ca1c2fb9b53bc579..a668b7a2c9e1ebe4ff9db6ba60d38bed66e0c5b1 100644 (file)
@@ -305,7 +305,7 @@ class ModuleNationalChars : public Module
                std::ifstream ifs(filename.c_str());
                if (ifs.fail())
                {
-                       ServerInstance->Logs->Log("m_nationalchars",LOG_DEFAULT,"loadtables() called for missing file: %s", filename.c_str());
+                       ServerInstance->Logs->Log("m_nationalchars", LOG_DEFAULT, "loadtables() called for missing file: %s", filename.c_str());
                        return;
                }
 
@@ -320,7 +320,7 @@ class ModuleNationalChars : public Module
                {
                        if (loadtable(ifs, tables[n], 255) && (n < faillimit))
                        {
-                               ServerInstance->Logs->Log("m_nationalchars",LOG_DEFAULT,"loadtables() called for illegal file: %s (line %d)", filename.c_str(), n+1);
+                               ServerInstance->Logs->Log("m_nationalchars", LOG_DEFAULT, "loadtables() called for illegal file: %s (line %d)", filename.c_str(), n+1);
                                return;
                        }
                }
index d7444845e355f80e5836a75a9e3d16df985c1108..0bf67ed7682e272317563b21673c148984a51ffa 100644 (file)
@@ -44,7 +44,7 @@ static bool WriteDatabase()
        f = fopen(tempname.c_str(), "w");
        if (!f)
        {
-               ServerInstance->Logs->Log("m_permchannels",LOG_DEFAULT, "permchannels: Cannot create database! %s (%d)", strerror(errno), errno);
+               ServerInstance->Logs->Log("m_permchannels", LOG_DEFAULT, "permchannels: Cannot create database! %s (%d)", strerror(errno), errno);
                ServerInstance->SNO->WriteToSnoMask('a', "database: cannot create new db: %s (%d)", strerror(errno), errno);
                return false;
        }
@@ -95,7 +95,7 @@ static bool WriteDatabase()
        write_error |= fclose(f);
        if (write_error)
        {
-               ServerInstance->Logs->Log("m_permchannels",LOG_DEFAULT, "permchannels: Cannot write to new database! %s (%d)", strerror(errno), errno);
+               ServerInstance->Logs->Log("m_permchannels", LOG_DEFAULT, "permchannels: Cannot write to new database! %s (%d)", strerror(errno), errno);
                ServerInstance->SNO->WriteToSnoMask('a', "database: cannot write to new db: %s (%d)", strerror(errno), errno);
                return false;
        }
@@ -103,7 +103,7 @@ static bool WriteDatabase()
 #ifdef _WIN32
        if (remove(permchannelsconf.c_str()))
        {
-               ServerInstance->Logs->Log("m_permchannels",LOG_DEFAULT, "permchannels: Cannot remove old database! %s (%d)", strerror(errno), errno);
+               ServerInstance->Logs->Log("m_permchannels", LOG_DEFAULT, "permchannels: Cannot remove old database! %s (%d)", strerror(errno), errno);
                ServerInstance->SNO->WriteToSnoMask('a', "database: cannot remove old database: %s (%d)", strerror(errno), errno);
                return false;
        }
@@ -111,7 +111,7 @@ static bool WriteDatabase()
        // Use rename to move temporary to new db - this is guarenteed not to fuck up, even in case of a crash.
        if (rename(tempname.c_str(), permchannelsconf.c_str()) < 0)
        {
-               ServerInstance->Logs->Log("m_permchannels",LOG_DEFAULT, "permchannels: Cannot move new to old database! %s (%d)", strerror(errno), errno);
+               ServerInstance->Logs->Log("m_permchannels", LOG_DEFAULT, "permchannels: Cannot move new to old database! %s (%d)", strerror(errno), errno);
                ServerInstance->SNO->WriteToSnoMask('a', "database: cannot replace old with new db: %s (%d)", strerror(errno), errno);
                return false;
        }
index c971d1c5a1434fc0dce29a9219f866b4bea93a62..8cae025e2c105dc7fdc443acd1a31fc0148ed360 100644 (file)
@@ -220,7 +220,7 @@ class CommandSASL : public Command
                User* target = ServerInstance->FindNick(parameters[1]);
                if ((!target) || (IS_SERVER(target)))
                {
-                       ServerInstance->Logs->Log("m_sasl", LOG_DEBUG,"User not found in sasl ENCAP event: %s", parameters[1].c_str());
+                       ServerInstance->Logs->Log("m_sasl", LOG_DEBUG, "User not found in sasl ENCAP event: %s", parameters[1].c_str());
                        return CMD_FAILURE;
                }
 
index 5e58a164f2850a3678a8d5bf2bc94edbf156b82a..f84c101e052bad0a5f88ca9603faf4048804d651 100644 (file)
@@ -73,7 +73,7 @@ CmdResult CommandFJoin::Handle(const std::vector<std::string>& params, User *src
        time_t TS = ConvToInt(params[1]);
        if (!TS)
        {
-               ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"*** BUG? *** TS of 0 sent to FJOIN. Are some services authors smoking craq, or is it 1970 again?. Dropped.");
+               ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "*** BUG? *** TS of 0 sent to FJOIN. Are some services authors smoking craq, or is it 1970 again?. Dropped.");
                ServerInstance->SNO->WriteToSnoMask('d', "WARNING: The server %s is sending FJOIN with a TS of zero. Total craq. Command was dropped.", srcuser->server.c_str());
                return CMD_INVALID;
        }
index a91803384f2e8298cb70349bbb357afce86193e9..7be904faf7552bb10b2185cc25989f507f2c2b9f 100644 (file)
@@ -27,7 +27,7 @@ CmdResult CommandFMode::Handle(const std::vector<std::string>& params, User *who
        time_t TS = ConvToInt(params[1]);
        if (!TS)
        {
-               ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"*** BUG? *** TS of 0 sent to FMODE. Are some services authors smoking craq, or is it 1970 again?. Dropping link.");
+               ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "*** BUG? *** TS of 0 sent to FMODE. Are some services authors smoking craq, or is it 1970 again?. Dropping link.");
                ServerInstance->SNO->WriteToSnoMask('d', "WARNING: The server %s is sending FMODE with a TS of zero. Total craq, dropping link.", who->server.c_str());
                return CMD_INVALID;
        }
index b7c952797b3318146418a8070a257ae96df6b507..ad632dbc7057c3c4bcf491619cfd71cff12f590f 100644 (file)
@@ -59,7 +59,7 @@ std::string TreeSocket::MakePass(const std::string &password, const std::string
                return "AUTH:" + BinToBase64(sha256->hmac(password, challenge));
 
        if (!challenge.empty() && !sha256)
-               ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"Not authenticating to server using SHA256/HMAC because we don't have m_sha256 loaded!");
+               ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "Not authenticating to server using SHA256/HMAC because we don't have m_sha256 loaded!");
 
        return password;
 }
index 123a837184ea911f2c9f2e90d78df385ca27349b..72128a1c390ae1ed01788f83fdd1a86d2f36a93d 100644 (file)
@@ -35,7 +35,7 @@ const std::string ModuleSpanningTree::MapOperInfo(TreeServer* Current)
 
 void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, int &line, char* names, int &maxnamew, char* stats)
 {
-       ServerInstance->Logs->Log("map",LOG_DEBUG,"ShowMap depth %d on line %d", depth, line);
+       ServerInstance->Logs->Log("map", LOG_DEBUG, "ShowMap depth %d on line %d", depth, line);
        float percent;
 
        if (ServerInstance->Users->clientlist->size() == 0)
@@ -171,7 +171,7 @@ bool ModuleSpanningTree::HandleMap(const std::vector<std::string>& parameters, U
 
        float avg_users = totusers * 1.0 / line;
 
-       ServerInstance->Logs->Log("map",LOG_DEBUG,"local");
+       ServerInstance->Logs->Log("map", LOG_DEBUG, "local");
        for (int t = 0; t < line; t++)
        {
                // terminate the string at maxnamew characters
index c10bccaf9bcaeda151230b03423fb5e55e207c0c..551ce06d5aa96319a2186358de64d05c9c67f839 100644 (file)
@@ -67,7 +67,7 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, const std::string &
                TreeServer* sdest = FindServer(routing.serverdest);
                if (!sdest)
                {
-                       ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"Trying to route ENCAP to nonexistant server %s",
+                       ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "Trying to route ENCAP to nonexistant server %s",
                                routing.serverdest.c_str());
                        return;
                }
@@ -82,7 +82,7 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, const std::string &
 
                if (!(ver.Flags & (VF_COMMON | VF_CORE)) && srcmodule != Creator)
                {
-                       ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"Routed command %s from non-VF_COMMON module %s",
+                       ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "Routed command %s from non-VF_COMMON module %s",
                                command.c_str(), srcmodule->ModuleSourceFile.c_str());
                        return;
                }
index b2d14069c1f7ac7daab4430b49ccdb7f59a0c606..96e338c533f596c503ee3fed9d0da6fbaa924734 100644 (file)
@@ -123,7 +123,7 @@ void SecurityIPResolver::OnError(const DNS::Query *r)
                        delete res;
                }
        }
-       ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"Could not resolve IP associated with Link '%s': %s",
+       ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "Could not resolve IP associated with Link '%s': %s",
                MyLink->Name.c_str(), this->manager->GetErrorStr(r->error).c_str());
 }
 
index 4ce7c49d5d2cc803036671e7caf5dfdfb8e87554..c9956c7781654e09b856c41c2bd28901b740c44e 100644 (file)
@@ -69,7 +69,7 @@ TreeServer::TreeServer(SpanningTreeUtilities* Util, std::string Name, std::strin
 
        long ts = ServerInstance->Time() * 1000 + (ServerInstance->Time_ns() / 1000000);
        this->StartBurst = ts;
-       ServerInstance->Logs->Log("m_spanningtree",LOG_DEBUG, "Started bursting at time %lu", ts);
+       ServerInstance->Logs->Log("m_spanningtree", LOG_DEBUG, "Started bursting at time %lu", ts);
 
        /* find the 'route' for this server (e.g. the one directly connected
         * to the local server, which we can use to reach it)
@@ -157,7 +157,7 @@ void TreeServer::FinishBurst()
 
 void TreeServer::SetID(const std::string &id)
 {
-       ServerInstance->Logs->Log("m_spanningtree",LOG_DEBUG, "Setting SID to " + id);
+       ServerInstance->Logs->Log("m_spanningtree", LOG_DEBUG, "Setting SID to " + id);
        sid = id;
        Utils->sidlist[sid] = this;
 }
index 9d0002b66bc96c2ee3da00fcd988876d59f114b5..dc81842b142b47a6b57d401d92cbb299965bf3e3 100644 (file)
@@ -154,7 +154,7 @@ void TreeSocket::SendError(const std::string &errormessage)
 void TreeSocket::SquitServer(std::string &from, TreeServer* Current, int& num_lost_servers, int& num_lost_users)
 {
        std::string servername = Current->GetName();
-       ServerInstance->Logs->Log("m_spanningtree",LOG_DEBUG,"SquitServer for %s from %s",
+       ServerInstance->Logs->Log("m_spanningtree", LOG_DEBUG, "SquitServer for %s from %s",
                servername.c_str(), from.c_str());
        /* recursively squit the servers attached to 'Current'.
         * We're going backwards so we don't remove users
@@ -216,7 +216,7 @@ void TreeSocket::Squit(TreeServer* Current, const std::string &reason)
                }
        }
        else
-               ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"Squit from unknown server");
+               ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "Squit from unknown server");
 }
 
 /** This function is called when we receive data from a remote
index d1015ec8618a2cf50e82be1de83fefc3b0de22c9..1b3b9dae2e8bba907a04097e4f0367cbf099ee29 100644 (file)
@@ -298,7 +298,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command,
        if ((!route_back_again) || (route_back_again->GetSocket() != this))
        {
                if (route_back_again)
-                       ServerInstance->Logs->Log("m_spanningtree",LOG_DEBUG,"Protocol violation: Fake direction '%s' from connection '%s'",
+                       ServerInstance->Logs->Log("m_spanningtree", LOG_DEBUG, "Protocol violation: Fake direction '%s' from connection '%s'",
                                prefix.c_str(),linkID.c_str());
                return;
        }
index f962ad086c3094b4483713e773e7542f92bd2169..4bcc2d9b2bae7690faa783032c747ef0e5bcac47 100644 (file)
@@ -62,7 +62,7 @@ CmdResult CommandUID::Handle(const parameterlist &params, User* serversrc)
                 * Nick collision.
                 */
                int collide = sock->DoCollision(iter->second, age_t, params[5], params[6], params[0]);
-               ServerInstance->Logs->Log("m_spanningtree",LOG_DEBUG,"*** Collision on %s, collide=%d", params[2].c_str(), collide);
+               ServerInstance->Logs->Log("m_spanningtree", LOG_DEBUG, "*** Collision on %s, collide=%d", params[2].c_str(), collide);
 
                if (collide != 1)
                {
index 428ef72248fcc1c1784ca498032202a9d40f9d4f..157679ed7f2adda19bbe8add6e33ef9d39597d45 100644 (file)
@@ -130,7 +130,7 @@ SpanningTreeUtilities::SpanningTreeUtilities(ModuleSpanningTree* C)
        : RefreshTimer(this), Creator(C)
 {
        ServerInstance->Timers->AddTimer(&RefreshTimer);
-       ServerInstance->Logs->Log("m_spanningtree",LOG_DEBUG,"***** Using SID for hash: %s *****", ServerInstance->Config->GetSID().c_str());
+       ServerInstance->Logs->Log("m_spanningtree", LOG_DEBUG, "***** Using SID for hash: %s *****", ServerInstance->Config->GetSID().c_str());
 
        this->TreeRoot = new TreeServer(this, ServerInstance->Config->ServerName, ServerInstance->Config->ServerDesc, ServerInstance->Config->GetSID());
        this->ReadConfiguration();
@@ -275,7 +275,7 @@ void SpanningTreeUtilities::RefreshIPCache()
                Link* L = *i;
                if (!L->Port)
                {
-                       ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"m_spanningtree: Ignoring a link block without a port.");
+                       ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "m_spanningtree: Ignoring a link block without a port.");
                        /* Invalid link block */
                        continue;
                }
@@ -366,11 +366,11 @@ void SpanningTreeUtilities::ReadConfiguration()
                if (L->IPAddr.empty())
                {
                        L->IPAddr = "*";
-                       ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"Configuration warning: Link block '" + assign(L->Name) + "' has no IP defined! This will allow any IP to connect as this server, and MAY not be what you want.");
+                       ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "Configuration warning: Link block '" + assign(L->Name) + "' has no IP defined! This will allow any IP to connect as this server, and MAY not be what you want.");
                }
 
                if (!L->Port)
-                       ServerInstance->Logs->Log("m_spanningtree",LOG_DEFAULT,"Configuration warning: Link block '" + assign(L->Name) + "' has no port defined, you will not be able to /connect it.");
+                       ServerInstance->Logs->Log("m_spanningtree", LOG_DEFAULT, "Configuration warning: Link block '" + assign(L->Name) + "' has no port defined, you will not be able to /connect it.");
 
                L->Fingerprint.erase(std::remove(L->Fingerprint.begin(), L->Fingerprint.end(), ':'), L->Fingerprint.end());
                LinkBlocks.push_back(L);
index 84ae280ab7f72194364fa4e88656edbf752349a4..0ae468576ef1c75a0d76aa213cf445886aa3a469 100644 (file)
@@ -34,7 +34,7 @@ class OpMeQuery : public SQLQuery
 
        void OnResult(SQLResult& res) CXX11_OVERRIDE
        {
-               ServerInstance->Logs->Log("m_sqloper",LOG_DEBUG, "SQLOPER: result for %s", uid.c_str());
+               ServerInstance->Logs->Log("m_sqloper", LOG_DEBUG, "SQLOPER: result for %s", uid.c_str());
                User* user = ServerInstance->FindNick(uid);
                if (!user)
                        return;
@@ -46,14 +46,14 @@ class OpMeQuery : public SQLQuery
                        if (OperUser(user, row[0], row[1]))
                                return;
                }
-               ServerInstance->Logs->Log("m_sqloper",LOG_DEBUG, "SQLOPER: no matches for %s (checked %d rows)", uid.c_str(), res.Rows());
+               ServerInstance->Logs->Log("m_sqloper", LOG_DEBUG, "SQLOPER: no matches for %s (checked %d rows)", uid.c_str(), res.Rows());
                // nobody succeeded... fall back to OPER
                fallback();
        }
 
        void OnError(SQLerror& error) CXX11_OVERRIDE
        {
-               ServerInstance->Logs->Log("m_sqloper",LOG_DEFAULT, "SQLOPER: query failed (%s)", error.Str());
+               ServerInstance->Logs->Log("m_sqloper", LOG_DEFAULT, "SQLOPER: query failed (%s)", error.Str());
                fallback();
        }
 
@@ -74,7 +74,7 @@ class OpMeQuery : public SQLQuery
                }
                else
                {
-                       ServerInstance->Logs->Log("m_sqloper",LOG_SPARSE, "BUG: WHAT?! Why do we have no OPER command?!");
+                       ServerInstance->Logs->Log("m_sqloper", LOG_SPARSE, "BUG: WHAT?! Why do we have no OPER command?!");
                }
        }
 
@@ -83,7 +83,7 @@ class OpMeQuery : public SQLQuery
                OperIndex::iterator iter = ServerInstance->Config->oper_blocks.find(" " + type);
                if (iter == ServerInstance->Config->oper_blocks.end())
                {
-                       ServerInstance->Logs->Log("m_sqloper",LOG_DEFAULT, "SQLOPER: bad type '%s' in returned row for oper %s", type.c_str(), username.c_str());
+                       ServerInstance->Logs->Log("m_sqloper", LOG_DEFAULT, "SQLOPER: bad type '%s' in returned row for oper %s", type.c_str(), username.c_str());
                        return false;
                }
                OperInfo* ifo = iter->second;
@@ -145,7 +145,7 @@ public:
                                /* Query is in progress, it will re-invoke OPER if needed */
                                return MOD_RES_DENY;
                        }
-                       ServerInstance->Logs->Log("m_sqloper",LOG_DEFAULT, "SQLOPER: database not present");
+                       ServerInstance->Logs->Log("m_sqloper", LOG_DEFAULT, "SQLOPER: database not present");
                }
                return MOD_RES_PASSTHRU;
        }
index 020095f7c879f6e5dbac407c3aacbc47080ef250..f73262f5ad6126e60945ff0ac034742624609d97 100644 (file)
@@ -93,17 +93,17 @@ class ModuleXLineDB : public Module
                 * Technically, that means that this can block, but I have *never* seen that.
                 *              -- w00t
                 */
-               ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Opening temporary database");
+               ServerInstance->Logs->Log("m_xline_db", LOG_DEBUG, "xlinedb: Opening temporary database");
                std::string xlinenewdbpath = xlinedbpath + ".new";
                f = fopen(xlinenewdbpath.c_str(), "w");
                if (!f)
                {
-                       ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Cannot create database! %s (%d)", strerror(errno), errno);
+                       ServerInstance->Logs->Log("m_xline_db", LOG_DEBUG, "xlinedb: Cannot create database! %s (%d)", strerror(errno), errno);
                        ServerInstance->SNO->WriteToSnoMask('a', "database: cannot create new db: %s (%d)", strerror(errno), errno);
                        return false;
                }
 
-               ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Opened. Writing..");
+               ServerInstance->Logs->Log("m_xline_db", LOG_DEBUG, "xlinedb: Opened. Writing..");
 
                /*
                 * Now, much as I hate writing semi-unportable formats, additional
@@ -130,14 +130,14 @@ class ModuleXLineDB : public Module
                        }
                }
 
-               ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Finished writing XLines. Checking for error..");
+               ServerInstance->Logs->Log("m_xline_db", LOG_DEBUG, "xlinedb: Finished writing XLines. Checking for error..");
 
                int write_error = 0;
                write_error = ferror(f);
                write_error |= fclose(f);
                if (write_error)
                {
-                       ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Cannot write to new database! %s (%d)", strerror(errno), errno);
+                       ServerInstance->Logs->Log("m_xline_db", LOG_DEBUG, "xlinedb: Cannot write to new database! %s (%d)", strerror(errno), errno);
                        ServerInstance->SNO->WriteToSnoMask('a', "database: cannot write to new db: %s (%d)", strerror(errno), errno);
                        return false;
                }
@@ -145,7 +145,7 @@ class ModuleXLineDB : public Module
 #ifdef _WIN32
                if (remove(xlinedbpath.c_str()))
                {
-                       ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Cannot remove old database! %s (%d)", strerror(errno), errno);
+                       ServerInstance->Logs->Log("m_xline_db", LOG_DEBUG, "xlinedb: Cannot remove old database! %s (%d)", strerror(errno), errno);
                        ServerInstance->SNO->WriteToSnoMask('a', "database: cannot remove old database: %s (%d)", strerror(errno), errno);
                        return false;
                }
@@ -153,7 +153,7 @@ class ModuleXLineDB : public Module
                // Use rename to move temporary to new db - this is guarenteed not to fuck up, even in case of a crash.
                if (rename(xlinenewdbpath.c_str(), xlinedbpath.c_str()) < 0)
                {
-                       ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Cannot move new to old database! %s (%d)", strerror(errno), errno);
+                       ServerInstance->Logs->Log("m_xline_db", LOG_DEBUG, "xlinedb: Cannot move new to old database! %s (%d)", strerror(errno), errno);
                        ServerInstance->SNO->WriteToSnoMask('a', "database: cannot replace old with new db: %s (%d)", strerror(errno), errno);
                        return false;
                }
@@ -177,7 +177,7 @@ class ModuleXLineDB : public Module
                        else
                        {
                                /* this might be slightly more problematic. */
-                               ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Cannot read database! %s (%d)", strerror(errno), errno);
+                               ServerInstance->Logs->Log("m_xline_db", LOG_DEBUG, "xlinedb: Cannot read database! %s (%d)", strerror(errno), errno);
                                ServerInstance->SNO->WriteToSnoMask('a', "database: cannot read db: %s (%d)", strerror(errno), errno);
                                return false;
                        }
@@ -209,18 +209,18 @@ class ModuleXLineDB : public Module
                                items++;
                        }
 
-                       ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Processing %s", linebuf);
+                       ServerInstance->Logs->Log("m_xline_db", LOG_DEBUG, "xlinedb: Processing %s", linebuf);
 
                        if (command_p[0] == "VERSION")
                        {
                                if (command_p[1] == "1")
                                {
-                                       ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: Reading db version %s", command_p[1].c_str());
+                                       ServerInstance->Logs->Log("m_xline_db", LOG_DEBUG, "xlinedb: Reading db version %s", command_p[1].c_str());
                                }
                                else
                                {
                                        fclose(f);
-                                       ServerInstance->Logs->Log("m_xline_db",LOG_DEBUG, "xlinedb: I got database version %s - I don't understand it", command_p[1].c_str());
+                                       ServerInstance->Logs->Log("m_xline_db", LOG_DEBUG, "xlinedb: I got database version %s - I don't understand it", command_p[1].c_str());
                                        ServerInstance->SNO->WriteToSnoMask('a', "database: I got a database version (%s) I don't understand", command_p[1].c_str());
                                        return false;
                                }
index da6d2fc6b3579c4a02dcde268e68ff76836f0590..12fb632a756598fbcf0284d248362c3b5c9387e7 100644 (file)
@@ -58,19 +58,19 @@ bool InspIRCd::BindSocket(int sockfd, int port, const char* addr, bool dolisten)
                {
                        if (SE->Listen(sockfd, Config->MaxConn) == -1)
                        {
-                               this->Logs->Log("SOCKET",LOG_DEFAULT,"ERROR in listen(): %s",strerror(errno));
+                               this->Logs->Log("SOCKET", LOG_DEFAULT, "ERROR in listen(): %s",strerror(errno));
                                return false;
                        }
                        else
                        {
-                               this->Logs->Log("SOCKET",LOG_DEBUG,"New socket binding for %d with listen: %s:%d", sockfd, addr, port);
+                               this->Logs->Log("SOCKET", LOG_DEBUG, "New socket binding for %d with listen: %s:%d", sockfd, addr, port);
                                SE->NonBlocking(sockfd);
                                return true;
                        }
                }
                else
                {
-                       this->Logs->Log("SOCKET",LOG_DEBUG,"New socket binding for %d without listen: %s:%d", sockfd, addr, port);
+                       this->Logs->Log("SOCKET", LOG_DEBUG, "New socket binding for %d without listen: %s:%d", sockfd, addr, port);
                        return true;
                }
        }
@@ -89,7 +89,7 @@ int InspIRCd::BindPorts(FailedPortList &failed_ports)
                std::string Addr = tag->getString("address");
 
                if (strncasecmp(Addr.c_str(), "::ffff:", 7) == 0)
-                       this->Logs->Log("SOCKET",LOG_DEFAULT, "Using 4in6 (::ffff:) isn't recommended. You should bind IPv4 addresses directly instead.");
+                       this->Logs->Log("SOCKET", LOG_DEFAULT, "Using 4in6 (::ffff:) isn't recommended. You should bind IPv4 addresses directly instead.");
 
                irc::portparser portrange(porttag, false);
                int portno = -1;
@@ -136,11 +136,11 @@ int InspIRCd::BindPorts(FailedPortList &failed_ports)
                        n++;
                if (n == ports.end())
                {
-                       this->Logs->Log("SOCKET",LOG_DEFAULT,"Port bindings slipped out of vector, aborting close!");
+                       this->Logs->Log("SOCKET", LOG_DEFAULT, "Port bindings slipped out of vector, aborting close!");
                        break;
                }
 
-               this->Logs->Log("SOCKET",LOG_DEFAULT, "Port binding %s was removed from the config file, closing.",
+               this->Logs->Log("SOCKET", LOG_DEFAULT, "Port binding %s was removed from the config file, closing.",
                        (**n).bind_desc.c_str());
                delete *n;
 
index 895d8aa2504eef052016ee45ce7e1eb78f510cd3..68f14cc3840e7a5878097514cd28c50ed60f728f 100644 (file)
@@ -71,8 +71,8 @@ EPollEngine::EPollEngine()
 
        if (EngineHandle == -1)
        {
-               ServerInstance->Logs->Log("SOCKET",LOG_DEFAULT, "ERROR: Could not initialize socket engine: %s", strerror(errno));
-               ServerInstance->Logs->Log("SOCKET",LOG_DEFAULT, "ERROR: Your kernel probably does not have the proper features. This is a fatal error, exiting now.");
+               ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "ERROR: Could not initialize socket engine: %s", strerror(errno));
+               ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "ERROR: Your kernel probably does not have the proper features. This is a fatal error, exiting now.");
                std::cout << "ERROR: Could not initialize epoll socket engine: " << strerror(errno) << std::endl;
                std::cout << "ERROR: Your kernel probably does not have the proper features. This is a fatal error, exiting now." << std::endl;
                ServerInstance->Exit(EXIT_STATUS_SOCKETENGINE);
@@ -119,13 +119,13 @@ bool EPollEngine::AddFd(EventHandler* eh, int event_mask)
        int fd = eh->GetFd();
        if ((fd < 0) || (fd > GetMaxFds() - 1))
        {
-               ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"AddFd out of range: (fd: %d, max: %d)", fd, GetMaxFds());
+               ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "AddFd out of range: (fd: %d, max: %d)", fd, GetMaxFds());
                return false;
        }
 
        if (ref[fd])
        {
-               ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"Attempt to add duplicate fd: %d", fd);
+               ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "Attempt to add duplicate fd: %d", fd);
                return false;
        }
 
@@ -136,11 +136,11 @@ bool EPollEngine::AddFd(EventHandler* eh, int event_mask)
        int i = epoll_ctl(EngineHandle, EPOLL_CTL_ADD, fd, &ev);
        if (i < 0)
        {
-               ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"Error adding fd: %d to socketengine: %s", fd, strerror(errno));
+               ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "Error adding fd: %d to socketengine: %s", fd, strerror(errno));
                return false;
        }
 
-       ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"New file descriptor: %d", fd);
+       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "New file descriptor: %d", fd);
 
        ref[fd] = eh;
        SocketEngine::SetEventMask(eh, event_mask);
@@ -168,7 +168,7 @@ void EPollEngine::DelFd(EventHandler* eh)
        int fd = eh->GetFd();
        if ((fd < 0) || (fd > GetMaxFds() - 1))
        {
-               ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"DelFd out of range: (fd: %d, max: %d)", fd, GetMaxFds());
+               ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "DelFd out of range: (fd: %d, max: %d)", fd, GetMaxFds());
                return;
        }
 
@@ -179,12 +179,12 @@ void EPollEngine::DelFd(EventHandler* eh)
 
        if (i < 0)
        {
-               ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"epoll_ctl can't remove socket: %s", strerror(errno));
+               ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "epoll_ctl can't remove socket: %s", strerror(errno));
        }
 
        ref[fd] = NULL;
 
-       ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"Remove file descriptor: %d", fd);
+       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "Remove file descriptor: %d", fd);
        CurrentSetSize--;
 }
 
@@ -202,7 +202,7 @@ int EPollEngine::DispatchEvents()
                EventHandler* eh = ref[events[j].data.fd];
                if (!eh)
                {
-                       ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"Got event on unknown fd: %d", events[j].data.fd);
+                       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "Got event on unknown fd: %d", events[j].data.fd);
                        epoll_ctl(EngineHandle, EPOLL_CTL_DEL, events[j].data.fd, &events[j]);
                        continue;
                }
index 7bd1232971f9a116343cf09d0d41c8e16f6bd8e5..a6c84133a10d52c5db6b97eb768db44556d9cd00 100644 (file)
@@ -93,8 +93,8 @@ void KQueueEngine::RecoverFromFork()
        EngineHandle = kqueue();
        if (EngineHandle == -1)
        {
-               ServerInstance->Logs->Log("SOCKET",LOG_DEFAULT, "ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features.");
-               ServerInstance->Logs->Log("SOCKET",LOG_DEFAULT, "ERROR: this is a fatal error, exiting now.");
+               ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features.");
+               ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "ERROR: this is a fatal error, exiting now.");
                std::cout << "ERROR: Could not initialize socket engine. Your kernel probably does not have the proper features." << std::endl;
                std::cout << "ERROR: this is a fatal error, exiting now." << std::endl;
                ServerInstance->Exit(EXIT_STATUS_SOCKETENGINE);
@@ -126,7 +126,7 @@ bool KQueueEngine::AddFd(EventHandler* eh, int event_mask)
        int i = kevent(EngineHandle, &ke, 1, 0, 0, NULL);
        if (i == -1)
        {
-               ServerInstance->Logs->Log("SOCKET",LOG_DEFAULT,"Failed to add fd: %d %s",
+               ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "Failed to add fd: %d %s",
                                          fd, strerror(errno));
                return false;
        }
@@ -136,7 +136,7 @@ bool KQueueEngine::AddFd(EventHandler* eh, int event_mask)
        OnSetEvent(eh, 0, event_mask);
        CurrentSetSize++;
 
-       ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"New file descriptor: %d", fd);
+       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "New file descriptor: %d", fd);
        return true;
 }
 
@@ -146,7 +146,7 @@ void KQueueEngine::DelFd(EventHandler* eh)
 
        if ((fd < 0) || (fd > GetMaxFds() - 1))
        {
-               ServerInstance->Logs->Log("SOCKET",LOG_DEFAULT,"DelFd() on invalid fd: %d", fd);
+               ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "DelFd() on invalid fd: %d", fd);
                return;
        }
 
@@ -163,14 +163,14 @@ void KQueueEngine::DelFd(EventHandler* eh)
 
        if (j < 0)
        {
-               ServerInstance->Logs->Log("SOCKET",LOG_DEFAULT,"Failed to remove fd: %d %s",
+               ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "Failed to remove fd: %d %s",
                                          fd, strerror(errno));
        }
 
        CurrentSetSize--;
        ref[fd] = NULL;
 
-       ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"Remove file descriptor: %d", fd);
+       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "Remove file descriptor: %d", fd);
 }
 
 void KQueueEngine::OnSetEvent(EventHandler* eh, int old_mask, int new_mask)
@@ -182,7 +182,7 @@ void KQueueEngine::OnSetEvent(EventHandler* eh, int old_mask, int new_mask)
                EV_SET(&ke, eh->GetFd(), EVFILT_WRITE, EV_ADD, 0, 0, NULL);
                int i = kevent(EngineHandle, &ke, 1, 0, 0, NULL);
                if (i < 0) {
-                       ServerInstance->Logs->Log("SOCKET",LOG_DEFAULT,"Failed to mark for writing: %d %s",
+                       ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "Failed to mark for writing: %d %s",
                                                  eh->GetFd(), strerror(errno));
                }
        }
@@ -193,7 +193,7 @@ void KQueueEngine::OnSetEvent(EventHandler* eh, int old_mask, int new_mask)
                EV_SET(&ke, eh->GetFd(), EVFILT_WRITE, EV_DELETE, 0, 0, NULL);
                int i = kevent(EngineHandle, &ke, 1, 0, 0, NULL);
                if (i < 0) {
-                       ServerInstance->Logs->Log("SOCKET",LOG_DEFAULT,"Failed to mark for writing: %d %s",
+                       ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "Failed to mark for writing: %d %s",
                                                  eh->GetFd(), strerror(errno));
                }
        }
@@ -204,7 +204,7 @@ void KQueueEngine::OnSetEvent(EventHandler* eh, int old_mask, int new_mask)
                EV_SET(&ke, eh->GetFd(), EVFILT_WRITE, EV_ADD | EV_ONESHOT, 0, 0, NULL);
                int i = kevent(EngineHandle, &ke, 1, 0, 0, NULL);
                if (i < 0) {
-                       ServerInstance->Logs->Log("SOCKET",LOG_DEFAULT,"Failed to mark for writing: %d %s",
+                       ServerInstance->Logs->Log("SOCKET", LOG_DEFAULT, "Failed to mark for writing: %d %s",
                                                  eh->GetFd(), strerror(errno));
                }
        }
index 0c7d41967095da902f7fc4f2ccdb28630501abda..37f4b6836a09038d3b3abd3199c187a4608c9716 100644 (file)
@@ -137,13 +137,13 @@ bool PollEngine::AddFd(EventHandler* eh, int event_mask)
        int fd = eh->GetFd();
        if ((fd < 0) || (fd > GetMaxFds() - 1))
        {
-               ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"AddFd out of range: (fd: %d, max: %d)", fd, GetMaxFds());
+               ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "AddFd out of range: (fd: %d, max: %d)", fd, GetMaxFds());
                return false;
        }
 
        if (fd_mappings.find(fd) != fd_mappings.end())
        {
-               ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"Attempt to add duplicate fd: %d", fd);
+               ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "Attempt to add duplicate fd: %d", fd);
                return false;
        }
 
@@ -154,7 +154,7 @@ bool PollEngine::AddFd(EventHandler* eh, int event_mask)
        events[index].fd = fd;
        events[index].events = mask_to_poll(event_mask);
 
-       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG,"New file descriptor: %d (%d; index %d)", fd, events[fd].events, index);
+       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "New file descriptor: %d (%d; index %d)", fd, events[fd].events, index);
        SocketEngine::SetEventMask(eh, event_mask);
        CurrentSetSize++;
        return true;
@@ -173,7 +173,7 @@ void PollEngine::OnSetEvent(EventHandler* eh, int old_mask, int new_mask)
        std::map<int, unsigned int>::iterator it = fd_mappings.find(eh->GetFd());
        if (it == fd_mappings.end())
        {
-               ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"SetEvents() on unknown fd: %d", eh->GetFd());
+               ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "SetEvents() on unknown fd: %d", eh->GetFd());
                return;
        }
 
@@ -192,7 +192,7 @@ void PollEngine::DelFd(EventHandler* eh)
        std::map<int, unsigned int>::iterator it = fd_mappings.find(fd);
        if (it == fd_mappings.end())
        {
-               ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"DelFd() on unknown fd: %d", fd);
+               ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "DelFd() on unknown fd: %d", fd);
                return;
        }
 
index 42bd865c18712b2585ae50fa465d83c752ac16a2..8a2fb87f409ced96fd8ffa7b178f2f5901cb14e5 100644 (file)
@@ -82,8 +82,8 @@ PortsEngine::PortsEngine()
 
        if (EngineHandle == -1)
        {
-               ServerInstance->Logs->Log("SOCKET",LOG_SPARSE,"ERROR: Could not initialize socket engine: %s", strerror(errno));
-               ServerInstance->Logs->Log("SOCKET",LOG_SPARSE,"ERROR: This is a fatal error, exiting now.");
+               ServerInstance->Logs->Log("SOCKET", LOG_SPARSE, "ERROR: Could not initialize socket engine: %s", strerror(errno));
+               ServerInstance->Logs->Log("SOCKET", LOG_SPARSE, "ERROR: This is a fatal error, exiting now.");
                std::cout << "ERROR: Could not initialize socket engine: " << strerror(errno) << std::endl;
                std::cout << "ERROR: This is a fatal error, exiting now." << std::endl;
                ServerInstance->Exit(EXIT_STATUS_SOCKETENGINE);
@@ -125,7 +125,7 @@ bool PortsEngine::AddFd(EventHandler* eh, int event_mask)
        SocketEngine::SetEventMask(eh, event_mask);
        port_associate(EngineHandle, PORT_SOURCE_FD, fd, mask_to_events(event_mask), eh);
 
-       ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"New file descriptor: %d", fd);
+       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "New file descriptor: %d", fd);
        CurrentSetSize++;
        return true;
 }
@@ -147,7 +147,7 @@ void PortsEngine::DelFd(EventHandler* eh)
        CurrentSetSize--;
        ref[fd] = NULL;
 
-       ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"Remove file descriptor: %d", fd);
+       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "Remove file descriptor: %d", fd);
 }
 
 int PortsEngine::DispatchEvents()
index b721a6b0a2dcf26d245ab7b0f0ea783c20368d86..de366266ff1133f40e3cd8d3cc320b93c626b324 100644 (file)
@@ -84,7 +84,7 @@ bool SelectEngine::AddFd(EventHandler* eh, int event_mask)
 
        CurrentSetSize++;
 
-       ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"New file descriptor: %d", fd);
+       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "New file descriptor: %d", fd);
        return true;
 }
 
@@ -104,7 +104,7 @@ void SelectEngine::DelFd(EventHandler* eh)
        if (fd == MaxFD)
                --MaxFD;
 
-       ServerInstance->Logs->Log("SOCKET",LOG_DEBUG,"Remove file descriptor: %d", fd);
+       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "Remove file descriptor: %d", fd);
 }
 
 void SelectEngine::OnSetEvent(EventHandler* eh, int old_mask, int new_mask)
index aa0be2f3b6948ce1a649ba6dc4167141b4f21d14..a7646cb8a91793fa01ffa47d263b185416072238 100644 (file)
@@ -37,7 +37,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
        }
        catch (...)
        {
-               ServerInstance->Logs->Log("USERS", LOG_DEFAULT,"*** WTF *** Duplicated UUID! -- Crack smoking monkeys have been unleashed.");
+               ServerInstance->Logs->Log("USERS", LOG_DEFAULT, "*** WTF *** Duplicated UUID! -- Crack smoking monkeys have been unleashed.");
                ServerInstance->SNO->WriteToSnoMask('a', "WARNING *** Duplicate UUID allocated!");
                return;
        }
@@ -54,11 +54,11 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
                }
                catch (CoreException& modexcept)
                {
-                       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG,"%s threw an exception: %s", modexcept.GetSource(), modexcept.GetReason());
+                       ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "%s threw an exception: %s", modexcept.GetSource(), modexcept.GetReason());
                }
        }
 
-       ServerInstance->Logs->Log("USERS", LOG_DEBUG,"New user fd: %d", socket);
+       ServerInstance->Logs->Log("USERS", LOG_DEBUG, "New user fd: %d", socket);
 
        this->unregistered_count++;
 
@@ -135,7 +135,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
 
        if (!ServerInstance->SE->AddFd(eh, FD_WANT_FAST_READ | FD_WANT_EDGE_WRITE))
        {
-               ServerInstance->Logs->Log("USERS", LOG_DEBUG,"Internal error on new connection");
+               ServerInstance->Logs->Log("USERS", LOG_DEBUG, "Internal error on new connection");
                this->QuitUser(New, "Internal error handling connection");
        }