diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-10 16:08:14 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-10 16:08:14 +0000 |
commit | 9b56909a3b00b4dc25dfb27ccbf0859d2fd5eb7a (patch) | |
tree | 9e5999a6cf726c4df2d9bedcf95c07b1f0959b7a /src/cmd_who.cpp | |
parent | abdcc7adface2cea68ae2d6cc5d24dfedcb0a4f4 (diff) |
Slightly modify WHO <port> p to allow a port range, e.g. "WHO 6660-6669,7000,7001 p" would find all users on ports 6660 thru 6669, 7000 and 7001.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6958 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_who.cpp')
-rw-r--r-- | src/cmd_who.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cmd_who.cpp b/src/cmd_who.cpp index ff29447fb..df209991a 100644 --- a/src/cmd_who.cpp +++ b/src/cmd_who.cpp @@ -88,7 +88,13 @@ bool cmd_who::whomatch(userrec* user, const char* matchtext) else { if (opt_port) - port = (user->GetPort() == ConvToInt(matchtext)); + { + irc::portparser portrange(matchtext, false); + long portno = -1; + while ((portno = portrange.GetToken())) + if (portno == user->GetPort()) + port = true; + } else { if (opt_away) |