diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-03-14 12:56:20 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-03-14 12:56:20 +0100 |
commit | 146d85b5dea9ecb803a9a47c68b5489905634125 (patch) | |
tree | c8156a5db6cb0afaf5310a59d8c1a7c4ab6de838 /src/coremods | |
parent | dd94ac5e3c6485c294394cc18cbc4228510e7a47 (diff) |
Add InspIRCd::GetChans(), remove ChannelCount()
Diffstat (limited to 'src/coremods')
-rw-r--r-- | src/coremods/core_list.cpp | 3 | ||||
-rw-r--r-- | src/coremods/core_lusers.cpp | 2 | ||||
-rw-r--r-- | src/coremods/core_stats.cpp | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/coremods/core_list.cpp b/src/coremods/core_list.cpp index ceffae43a..505b0764c 100644 --- a/src/coremods/core_list.cpp +++ b/src/coremods/core_list.cpp @@ -68,7 +68,8 @@ CmdResult CommandList::Handle (const std::vector<std::string>& parameters, User } } - for (chan_hash::const_iterator i = ServerInstance->chanlist->begin(); i != ServerInstance->chanlist->end(); i++) + const chan_hash& chans = ServerInstance->GetChans(); + for (chan_hash::const_iterator i = chans.begin(); i != chans.end(); ++i) { // attempt to match a glob pattern long users = i->second->GetUserCounter(); diff --git a/src/coremods/core_lusers.cpp b/src/coremods/core_lusers.cpp index e56b1c0bb..206d969d1 100644 --- a/src/coremods/core_lusers.cpp +++ b/src/coremods/core_lusers.cpp @@ -93,7 +93,7 @@ CmdResult CommandLusers::Handle (const std::vector<std::string>&, User *user) if (ServerInstance->Users->UnregisteredUserCount()) user->WriteNumeric(RPL_LUSERUNKNOWN, "%d :unknown connections", ServerInstance->Users->UnregisteredUserCount()); - user->WriteNumeric(RPL_LUSERCHANNELS, "%ld :channels formed", ServerInstance->ChannelCount()); + user->WriteNumeric(RPL_LUSERCHANNELS, "%lu :channels formed", (unsigned long)ServerInstance->GetChans().size()); user->WriteNumeric(RPL_LUSERME, ":I have %d clients and %d servers", ServerInstance->Users->LocalUserCount(),n_local_servs); user->WriteNumeric(RPL_LOCALUSERS, ":Current Local Users: %d Max: %d", ServerInstance->Users->LocalUserCount(), counters.max_local); user->WriteNumeric(RPL_GLOBALUSERS, ":Current Global Users: %d Max: %d", n_users, counters.max_global); diff --git a/src/coremods/core_stats.cpp b/src/coremods/core_stats.cpp index 8e74b8376..df0c12725 100644 --- a/src/coremods/core_stats.cpp +++ b/src/coremods/core_stats.cpp @@ -202,7 +202,7 @@ void CommandStats::DoStats(char statschar, User* user, string_list &results) case 'z': { results.push_back("249 "+user->nick+" :Users: "+ConvToStr(ServerInstance->Users->clientlist->size())); - results.push_back("249 "+user->nick+" :Channels: "+ConvToStr(ServerInstance->chanlist->size())); + results.push_back("249 "+user->nick+" :Channels: "+ConvToStr(ServerInstance->GetChans().size())); results.push_back("249 "+user->nick+" :Commands: "+ConvToStr(ServerInstance->Parser->cmdlist.size())); float kbitpersec_in, kbitpersec_out, kbitpersec_total; |