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/cmd_stats.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/commands/cmd_stats.cpp') diff --git a/src/commands/cmd_stats.cpp b/src/commands/cmd_stats.cpp index 4af8dcb91..f09fcf84f 100644 --- a/src/commands/cmd_stats.cpp +++ b/src/commands/cmd_stats.cpp @@ -127,9 +127,9 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str case 'U': { char ulined[MAXBUF]; - for (int i = 0; i < ServerInstance->Config->ConfValueEnum(ServerInstance->Config->config_data, "uline"); i++) + for (int i = 0; i < ServerInstance->Config->ConfValueEnum("uline"); i++) { - ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "uline","server", i, ulined, MAXBUF); + ServerInstance->Config->ConfValue("uline","server", i, ulined, MAXBUF); results.push_back(sn+" 248 "+user->nick+" U "+std::string(ulined)); } } @@ -280,14 +280,14 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str /* stats o */ case 'o': - for (int i = 0; i < ServerInstance->Config->ConfValueEnum(ServerInstance->Config->config_data, "oper"); i++) + for (int i = 0; i < ServerInstance->Config->ConfValueEnum("oper"); i++) { char LoginName[MAXBUF]; char HostName[MAXBUF]; char OperType[MAXBUF]; - ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "oper","name", i, LoginName, MAXBUF); - ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "oper","host", i, HostName, MAXBUF); - ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "oper","type", i, OperType, MAXBUF); + ServerInstance->Config->ConfValue("oper","name", i, LoginName, MAXBUF); + ServerInstance->Config->ConfValue("oper","host", i, HostName, MAXBUF); + ServerInstance->Config->ConfValue("oper","type", i, OperType, MAXBUF); results.push_back(sn+" 243 "+user->nick+" O "+HostName+" * "+LoginName+" "+OperType+" 0"); } break; -- cgit v1.3.1-10-gc9f91