summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-02-12 21:21:17 +0100
committerattilamolnar <attilamolnar@hush.com>2013-03-03 23:08:33 +0100
commit596f199f11c419eda2a944204ce516af437c44ac (patch)
tree0e95075249332ada0d9deafb97bbb8d273f242f8
parent19523c7500bfa5624c2c9c80075f5ddb166c833e (diff)
cmd_lusers Use of size() instead of counting elements
-rw-r--r--src/commands/cmd_lusers.cpp5
1 files changed, 2 insertions, 3 deletions
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<std::string>&, 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++;
}