From 5b1ee304b5e1d71c71eec9ebf8f40758dfce5c1e Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 13 Jun 2014 15:45:55 +0200 Subject: Change allocation of InspIRCd::Parser to be physically part of the object containing it --- src/coremods/core_info/cmd_commands.cpp | 2 +- src/coremods/core_stats.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/coremods') diff --git a/src/coremods/core_info/cmd_commands.cpp b/src/coremods/core_info/cmd_commands.cpp index 8b255a928..3a892c5c4 100644 --- a/src/coremods/core_info/cmd_commands.cpp +++ b/src/coremods/core_info/cmd_commands.cpp @@ -31,7 +31,7 @@ CommandCommands::CommandCommands(Module* parent) */ CmdResult CommandCommands::Handle (const std::vector&, User *user) { - const CommandParser::CommandMap& commands = ServerInstance->Parser->GetCommands(); + const CommandParser::CommandMap& commands = ServerInstance->Parser.GetCommands(); std::vector list; list.reserve(commands.size()); for (CommandParser::CommandMap::const_iterator i = commands.begin(); i != commands.end(); ++i) diff --git a/src/coremods/core_stats.cpp b/src/coremods/core_stats.cpp index 1e90ed2bf..1ae2e168e 100644 --- a/src/coremods/core_stats.cpp +++ b/src/coremods/core_stats.cpp @@ -190,7 +190,7 @@ void CommandStats::DoStats(char statschar, User* user, string_list &results) /* stats m (list number of times each command has been used, plus bytecount) */ case 'm': { - const CommandParser::CommandMap& commands = ServerInstance->Parser->GetCommands(); + const CommandParser::CommandMap& commands = ServerInstance->Parser.GetCommands(); for (CommandParser::CommandMap::const_iterator i = commands.begin(); i != commands.end(); ++i) { if (i->second->use_count) @@ -207,7 +207,7 @@ void CommandStats::DoStats(char statschar, User* user, string_list &results) { results.push_back("249 "+user->nick+" :Users: "+ConvToStr(ServerInstance->Users->GetUsers().size())); results.push_back("249 "+user->nick+" :Channels: "+ConvToStr(ServerInstance->GetChans().size())); - results.push_back("249 "+user->nick+" :Commands: "+ConvToStr(ServerInstance->Parser->GetCommands().size())); + results.push_back("249 "+user->nick+" :Commands: "+ConvToStr(ServerInstance->Parser.GetCommands().size())); float kbitpersec_in, kbitpersec_out, kbitpersec_total; char kbitpersec_in_s[30], kbitpersec_out_s[30], kbitpersec_total_s[30]; -- cgit v1.2.3