diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-02-12 21:21:17 +0100 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-03-03 23:08:33 +0100 |
commit | 596f199f11c419eda2a944204ce516af437c44ac (patch) | |
tree | 0e95075249332ada0d9deafb97bbb8d273f242f8 /src/commands/cmd_lusers.cpp | |
parent | 19523c7500bfa5624c2c9c80075f5ddb166c833e (diff) |
cmd_lusers Use of size() instead of counting elements
Diffstat (limited to 'src/commands/cmd_lusers.cpp')
-rw-r--r-- | src/commands/cmd_lusers.cpp | 5 |
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++; } |