summaryrefslogtreecommitdiff
path: root/src/cmd_who.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-09 21:24:57 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-09 21:24:57 +0000
commitd0bde383434a9a88fc2737da8f8ca92e98d4c967 (patch)
tree95d6c7d73183295990858bf2ae277e8295c7bf1a /src/cmd_who.cpp
parentb328aad53b044bd9cf9720dfed216b0ee61c8e31 (diff)
Add WHO flag 'l', show only local users
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6928 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_who.cpp')
-rw-r--r--src/cmd_who.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cmd_who.cpp b/src/cmd_who.cpp
index dad3b90b8..097059498 100644
--- a/src/cmd_who.cpp
+++ b/src/cmd_who.cpp
@@ -44,6 +44,9 @@ bool cmd_who::whomatch(userrec* user, const char* matchtext)
if (user->registered != REG_ALL)
return false;
+ if (opt_local && !IS_LOCAL(user))
+ return false;
+
if (opt_mode)
{
for (const char* n = matchtext; *n; n++)
@@ -174,6 +177,7 @@ CmdResult cmd_who::Handle (const char** parameters, int pcnt, userrec *user)
opt_metadata = false;
opt_port = false;
opt_away = false;
+ opt_local = false;
chanrec *ch = NULL;
std::vector<std::string> whoresults;
@@ -224,6 +228,9 @@ CmdResult cmd_who::Handle (const char** parameters, int pcnt, userrec *user)
case 'a':
opt_away = true;
break;
+ case 'l':
+ opt_local = true;
+ break;
}
*iter++;