From c384697c88aa54b5a532cd2edce3c063c70d7868 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 1 Jul 2009 22:55:46 +0000 Subject: Make rehash generate a new ServerInstance->Config object This makes it possible to cancel a pending rehash, and fixes possible threading issues with rehash and other events. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11424 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/commands.cpp') diff --git a/src/commands.cpp b/src/commands.cpp index 6c390b8bf..db2074d87 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -24,10 +24,10 @@ bool InspIRCd::HostMatchesEveryone(const std::string &mask, User* user) char itrigger[MAXBUF]; long matches = 0; - if (!Config->ConfValue(Config->config_data, "insane","trigger", 0, itrigger, MAXBUF)) + if (!Config->ConfValue("insane","trigger", 0, itrigger, MAXBUF)) strlcpy(itrigger,"95.5",MAXBUF); - if (Config->ConfValueBool(Config->config_data, "insane","hostmasks", 0)) + if (Config->ConfValueBool("insane","hostmasks", 0)) return false; for (user_hash::iterator u = this->Users->clientlist->begin(); u != this->Users->clientlist->end(); u++) @@ -56,10 +56,10 @@ bool InspIRCd::IPMatchesEveryone(const std::string &ip, User* user) char itrigger[MAXBUF]; long matches = 0; - if (!Config->ConfValue(Config->config_data, "insane","trigger",0,itrigger,MAXBUF)) + if (!Config->ConfValue("insane","trigger",0,itrigger,MAXBUF)) strlcpy(itrigger,"95.5",MAXBUF); - if (Config->ConfValueBool(Config->config_data, "insane","ipmasks",0)) + if (Config->ConfValueBool("insane","ipmasks",0)) return false; for (user_hash::iterator u = this->Users->clientlist->begin(); u != this->Users->clientlist->end(); u++) @@ -85,10 +85,10 @@ bool InspIRCd::NickMatchesEveryone(const std::string &nick, User* user) char itrigger[MAXBUF]; long matches = 0; - if (!Config->ConfValue(Config->config_data, "insane","trigger",0,itrigger,MAXBUF)) + if (!Config->ConfValue("insane","trigger",0,itrigger,MAXBUF)) strlcpy(itrigger,"95.5",MAXBUF); - if (Config->ConfValueBool(Config->config_data, "insane","nickmasks",0)) + if (Config->ConfValueBool("insane","nickmasks",0)) return false; for (user_hash::iterator u = this->Users->clientlist->begin(); u != this->Users->clientlist->end(); u++) -- cgit v1.2.3