summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-10 21:15:56 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-10 21:15:56 +0000
commitcf513d2e3f0d6645d9b7aba5fa5e74499297e9a5 (patch)
tree18991a019e2263983e263eeabdf8a5b3a00d1f09 /src/commands
parent8cbc83c155bb70ec576aaf08ab9e395e00741c65 (diff)
Improve this not to use pointer maths directly, use an iterator
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9699 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/cmd_who.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp
index 5608f3557..2c91cb6e7 100644
--- a/src/commands/cmd_who.cpp
+++ b/src/commands/cmd_who.cpp
@@ -212,15 +212,12 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User *
if (ServerInstance->FindServerName(matchtext))
usingwildcards = true;
- if (parameters.count() > 1)
+ if (parameters.size() > 1)
{
- /* parse flags */
- const char *iter = parameters[1].c_str();
-
/* Fix for bug #444, WHO flags count as a wildcard */
usingwildcards = true;
- while (*iter)
+ for (std::string::const_iterator iter = parameters[1].begin(); iter != parameters[1].end(); ++iter)
{
switch (*iter)
{
@@ -260,8 +257,6 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User *
opt_far = true;
break;
}
-
- *iter++;
}
}