From 596f199f11c419eda2a944204ce516af437c44ac Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Tue, 12 Feb 2013 21:21:17 +0100 Subject: cmd_lusers Use of size() instead of counting elements --- src/commands/cmd_lusers.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/commands/cmd_lusers.cpp b/src/commands/cmd_lusers.cpp index 389a2602d..6866619c5 100644 --- a/src/commands/cmd_lusers.cpp +++ b/src/commands/cmd_lusers.cpp @@ -74,11 +74,10 @@ CmdResult CommandLusers::Handle (const std::vector&, User *user) unsigned int n_invis = ServerInstance->Users->ModeCount('i'); ProtoServerList serverlist; ServerInstance->PI->GetServerList(serverlist); - int n_serv = 0; - int n_local_servs = 0; + unsigned int n_serv = serverlist.size(); + unsigned int n_local_servs = 0; for(ProtoServerList::iterator i = serverlist.begin(); i != serverlist.end(); ++i) { - n_serv++; if (i->parentname == ServerInstance->Config->ServerName) n_local_servs++; } -- cgit v1.2.3