summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-18 16:52:58 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-18 16:52:58 +0000
commita578f50f03a15e87a8abd8381fb936f1679109b7 (patch)
tree80d935f121c5fadb4ffc65b60845c65bcf9cbb2c /src/commands
parent88ff6a1180068fbc0b35ce7975ec163a53ba0e18 (diff)
Tie a number of /who settings to servers/auspex and users/auspex respectively.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10674 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/cmd_stats.cpp2
-rw-r--r--src/commands/cmd_who.cpp14
2 files changed, 8 insertions, 8 deletions
diff --git a/src/commands/cmd_stats.cpp b/src/commands/cmd_stats.cpp
index 6c98e7b72..906ad901f 100644
--- a/src/commands/cmd_stats.cpp
+++ b/src/commands/cmd_stats.cpp
@@ -51,7 +51,7 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str
{
std::string sn(ServerInstance->Config->ServerName);
- if (!user->HasPrivPermission("servers/auspex") && !strchr(ServerInstance->Config->UserStats, statschar)))
+ if (!user->HasPrivPermission("servers/auspex") && !strchr(ServerInstance->Config->UserStats, statschar))
{
ServerInstance->SNO->WriteToSnoMask('t',
"%s '%c' denied for %s (%s@%s)",
diff --git a/src/commands/cmd_who.cpp b/src/commands/cmd_who.cpp
index 403ec5f64..6f8b91e75 100644
--- a/src/commands/cmd_who.cpp
+++ b/src/commands/cmd_who.cpp
@@ -136,7 +136,7 @@ bool CommandWho::CanView(Channel* chan, User* user)
if (chan->HasUser(user))
return true;
/* Opers see all */
- if (IS_OPER(user))
+ if (user->HasPrivPermission("users/auspex"))
return true;
/* Cant see inside a +s or a +p channel unless we are a member (see above) */
else if (!chan->IsModeSet('s') && !chan->IsModeSet('p'))
@@ -155,7 +155,7 @@ void CommandWho::SendWhoLine(User* user, const std::string &initial, Channel* ch
Channel* chlast = ServerInstance->FindChan(lcn);
std::string wholine = initial + (ch ? ch->name : lcn) + " " + u->ident + " " + (opt_showrealhost ? u->host : u->dhost) + " " +
- ((*ServerInstance->Config->HideWhoisServer && !IS_OPER(user)) ? ServerInstance->Config->HideWhoisServer : u->server) +
+ ((*ServerInstance->Config->HideWhoisServer && !user->HasPrivPermission("servers/auspex")) ? ServerInstance->Config->HideWhoisServer : u->server) +
" " + u->nick + " ";
/* away? */
@@ -239,11 +239,11 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User *
opt_viewopersonly = true;
break;
case 'h':
- if (IS_OPER(user))
+ if (user->HasPrivPermission("users/auspex"))
opt_showrealhost = true;
break;
case 'u':
- if (IS_OPER(user))
+ if (user->HasPrivPermission("users/auspex"))
opt_unlimit = true;
break;
case 'r':
@@ -300,7 +300,7 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User *
continue;
/* If we're not inside the channel, hide +i users */
- if (i->first->IsModeSet('i') && !inside && !IS_OPER(user))
+ if (i->first->IsModeSet('i') && !inside && !user->HasPrivPermission("users/auspex"))
continue;
}
@@ -322,7 +322,7 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User *
{
if (!user->SharesChannelWith(oper))
{
- if (usingwildcards && (!oper->IsModeSet('i')) && (!IS_OPER(user)))
+ if (usingwildcards && (!oper->IsModeSet('i')) && (!user->HasPrivPermission("users/auspex")))
continue;
}
@@ -338,7 +338,7 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User *
{
if (!user->SharesChannelWith(i->second))
{
- if (usingwildcards && (i->second->IsModeSet('i')) && (!IS_OPER(user)))
+ if (usingwildcards && (i->second->IsModeSet('i')) && (!user->HasPrivPermission("users/auspex")))
continue;
}