summaryrefslogtreecommitdiff
path: root/src/commands/cmd_who.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-03 17:45:31 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-03 17:45:31 +0000
commitd66ce94423efeba77c8ce51454b90eeab7cb627f (patch)
tree5c88f9aed166f21809335f5a4a34f688f10f30ee /src/commands/cmd_who.cpp
parentb2688f6cdf45c70985754001edcc2b1916f5bcb4 (diff)
Restrict some /WHO options to opers
There is no reason to be able to query the umodes of other users or the port they connected on; this can contain private information. If HideWhoisServer is on, also restrict local/far query. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11164 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands/cmd_who.cpp')
-rw-r--r--src/commands/cmd_who.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp
index 1b77dd004..b201b9815 100644
--- a/src/commands/cmd_who.cpp
+++ b/src/commands/cmd_who.cpp
@@ -250,7 +250,8 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User *
opt_realname = true;
break;
case 'm':
- opt_mode = true;
+ if (user->HasPrivPermission("users/auspex"))
+ opt_mode = true;
break;
case 'M':
if (user->HasPrivPermission("users/auspex"))
@@ -260,16 +261,19 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User *
opt_ident = true;
break;
case 'p':
- opt_port = true;
+ if (user->HasPrivPermission("users/auspex"))
+ opt_port = true;
break;
case 'a':
opt_away = true;
break;
case 'l':
- opt_local = true;
+ if (user->HasPrivPermission("users/auspex") || !*ServerInstance->Config->HideWhoisServer)
+ opt_local = true;
break;
case 'f':
- opt_far = true;
+ if (user->HasPrivPermission("users/auspex") || !*ServerInstance->Config->HideWhoisServer)
+ opt_far = true;
break;
case 't':
opt_time = true;