diff options
author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-28 00:48:36 +0000 |
---|---|---|
committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-28 00:48:36 +0000 |
commit | 090107db5f2afa16e155f56d7928e38d0a17a295 (patch) | |
tree | 396c2d0fd726a40aecd3d866f1a8cfdc0bc54732 /src/core/cs_info.c | |
parent | f2fb7ef53f1082f5c194f56f80592111051f1f76 (diff) |
Add access checking to cs_* modules. Also change number of arguments for cs_modes commands.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2134 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/cs_info.c')
-rw-r--r-- | src/core/cs_info.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/cs_info.c b/src/core/cs_info.c index 09d92e84f..3de3928cf 100644 --- a/src/core/cs_info.c +++ b/src/core/cs_info.c @@ -53,7 +53,7 @@ class CommandCSInfo : public Command ChannelInfo *ci; char buf[BUFSIZE]; struct tm *tm; - int is_servadmin = is_services_admin(u); + bool has_auspex = u->nc->HasPriv("chanserv/auspex"); int show_all = 0; time_t expt; @@ -78,7 +78,7 @@ class CommandCSInfo : public Command /* Should we show all fields? Only for sadmins and identified users */ - if (param && stricmp(param, "ALL") == 0 && (check_access(u, ci, CA_INFO) || is_servadmin)) + if (param && stricmp(param, "ALL") == 0 && (check_access(u, ci, CA_INFO) || has_auspex)) show_all = 1; notice_lang(s_ChanServ, u, CHAN_INFO_HEADER, chan); @@ -137,7 +137,7 @@ class CommandCSInfo : public Command } else { - if (is_servadmin) + if (has_auspex) { expt = ci->last_used + CSExpire; tm = localtime(&expt); @@ -151,7 +151,7 @@ class CommandCSInfo : public Command notice_lang(s_ChanServ, u, CHAN_X_SUSPENDED, ci->forbidby, (ci->forbidreason ? ci->forbidreason : getstring(u, NO_REASON))); } - if (!show_all && (check_access(u, ci, CA_INFO) || is_servadmin)) + if (!show_all && (check_access(u, ci, CA_INFO) || has_auspex)) notice_lang(s_ChanServ, u, NICK_INFO_FOR_MORE, s_ChanServ, ci->name); return MOD_CONT; } |