summaryrefslogtreecommitdiff
path: root/modules/commands/help.cpp
diff options
context:
space:
mode:
authorlethality <lethality@anope.org>2012-06-22 21:26:33 +0100
committerlethality <lethality@anope.org>2012-06-22 21:26:33 +0100
commitd8a99d619f7ae301ecf188dc460b1f5c7cb791ac (patch)
treeb327ce05b9b5cb598fbc829e48041d465bc2d579 /modules/commands/help.cpp
parentba53c7eb03add30acefbbc95bbd8b4b825b465b0 (diff)
parent2dec8e767a70def4b9b04a96ae4f75e4d1013038 (diff)
Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9
Diffstat (limited to 'modules/commands/help.cpp')
-rw-r--r--modules/commands/help.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/commands/help.cpp b/modules/commands/help.cpp
index 7b7c52110..c0c57dbae 100644
--- a/modules/commands/help.cpp
+++ b/modules/commands/help.cpp
@@ -30,7 +30,6 @@ class CommandHelp : public Command
if (MOD_RESULT == EVENT_STOP)
return;
- User *u = source.u;
const BotInfo *bi = source.owner;
if (params.empty())
@@ -48,7 +47,7 @@ class CommandHelp : public Command
service_reference<Command> c("Command", info.name);
if (!c)
continue;
- if (!Config->HidePrivilegedCommands || info.permission.empty() || u->HasCommand(info.permission))
+ if (!Config->HidePrivilegedCommands || info.permission.empty() || source.HasCommand(info.permission))
{
source.command = c_name;
c->OnServHelp(source);
@@ -75,7 +74,7 @@ class CommandHelp : public Command
if (!c)
continue;
- if (Config->HidePrivilegedCommands && !info.permission.empty() && !u->HasCommand(info.permission))
+ if (Config->HidePrivilegedCommands && !info.permission.empty() && !source.HasCommand(info.permission))
continue;
const Anope::string &subcommand = params.size() > max ? params[max] : "";
@@ -91,14 +90,14 @@ class CommandHelp : public Command
source.Reply(" ");
source.Reply(_("Access to this command requires the permission \002%s\002 to be present in your opertype."), info.permission.c_str());
}
- if (!c->HasFlag(CFLAG_ALLOW_UNREGISTERED) && !u->IsIdentified())
+ if (!c->HasFlag(CFLAG_ALLOW_UNREGISTERED) && !source.nc)
{
if (info.permission.empty())
source.Reply(" ");
source.Reply( _("You need to be identified to use this command."));
}
/* User doesn't have the proper permission to use this command */
- else if (!info.permission.empty() && !u->HasCommand(info.permission))
+ else if (!info.permission.empty() && !source.HasCommand(info.permission))
{
source.Reply(_("You cannot use this command."));
}